Format Field

P

PR

I am trying to format a field in the query panel... but can not seem to get
this to work...

I am using :

DOB: Format("DOB","dd, mmm yyyy")

can anyone let me know what is wrong with this...

Regards - Paul
 
M

Marshall Barton

PR said:
I am trying to format a field in the query panel... but can not seem to get
this to work...

I am using :

DOB: Format("DOB","dd, mmm yyyy")

can anyone let me know what is wrong with this...


You should use a different name for the calculated field,
but I suspect that the problem is that DOB is not a
Date/Time field in the table. I may be off on the wrong
track, but ir's all I can come up with given "can not seem
to get this to work..."

Generally, you should do the formatting using the Format
**property** of a text box on a form or report, not in a
calculated query field.
 
D

Duane Hookom

Also, the expression
DOB: Format("DOB","dd, mmm yyyy")
doesn't include a field name inside the Format. "DOB" is just a string
value, not a field reference.
Try:
DOfB: Format([DOB],"dd, mmm yyyy")

As Marsh suggested, I do all of my formatting in controls on forms and
reports.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Changing date format 2
Calcualating age by month day and year 1
Update query 2
Update query 1
Age calculation in Query 6
syntax error (comma) in expression 4
Date format in query export. 4
QUERY DESIGN 2

Top