How would I change the display format within a query field.

G

Guest

Let me extemporize; I have a query that extrapolates data from a few sources
and generates a name in which will be used and copied to create a file name.
The problem, is that it uses a date, and as we all know, microsoft wont let
you save a file with the'/' character. So here what I got:

File ID: [Schedule] & " " & [Name] & " #" & [ID]

So when I run the query it would look something like '01/12/2004 Bob Smith
#1234'

What I would rather have it display is '01.12.2004 Bob Smith #1234'

Is there anyway to format this? I have tried changing the way the table that
the query extrapolates this information from, displays, but this did not work.

Im assuming I need to insert a #mm.dd.yyyy# in there somewhere, but I do not
know how to do this.
 
D

Dan Artuso

Hi,
You can try this untested expression:
File ID: Format([Schedule],"mm.dd.yyyy") & " " & [Name] & " #" & [ID]
 
M

Marshall Barton

havocdragon said:
Let me extemporize; I have a query that extrapolates data from a few sources
and generates a name in which will be used and copied to create a file name.
The problem, is that it uses a date, and as we all know, microsoft wont let
you save a file with the'/' character. So here what I got:

File ID: [Schedule] & " " & [Name] & " #" & [ID]

So when I run the query it would look something like '01/12/2004 Bob Smith
#1234'

What I would rather have it display is '01.12.2004 Bob Smith #1234'


I think I finally understand your question. Try this:

File ID: Format([Schedule], "mm\.dd\.yyyy") & " " & ...
 

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

Top