Value List In Listbox

S

Sue

When I try to use the following expression,
Format(DateSerial(Year(Date),9,1), "mmm dd, yyyy"), as an item in the value
list of a listbox, the month and day appear on one line and the year appears
in the line below that. If I remove the comma after dd, the month, day and
year appear on the same line. How can I write the format expression to
include the comma to get Sep 1, 2004 all on the same line in the listbox?

Thanks!

Sue
 
M

Marshall Barton

Sue said:
When I try to use the following expression,
Format(DateSerial(Year(Date),9,1), "mmm dd, yyyy"), as an item in the value
list of a listbox, the month and day appear on one line and the year appears
in the line below that. If I remove the comma after dd, the month, day and
year appear on the same line. How can I write the format expression to
include the comma to get Sep 1, 2004 all on the same line in the listbox?


AFAIK, you can't.

When Access displays the items in the value list, it "cleans
up" the items in the list by dropping any quotes around an
item and changing all commas to semicolons (or treating them
the same).

BTW, you aren't really using that expression directly in the
value list, are you? The list is just a string with no
ability to evaluate an expression.
 

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