By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,587 Members | 1,079 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,587 IT Pros & Developers. It's quick & easy.

Formatting Value List

P: n/a
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
Nov 13 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Try:
Format(DateSerial(Year(Date),9,1), "mmm dd\, yyyy")

The backslash indicates that the next character is a literal.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Sue" <sm*****@notmyemail.com> wrote in message
news:t5******************@newsread3.news.atl.earth link.net...
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

Nov 13 '05 #2

P: n/a
Sue
That did not work either, Allen.

Sue
"Allen Browne" <Al*********@SeeSig.Invalid> wrote in message
news:41***********************@per-qv1-newsreader-01.iinet.net.au...
Try:
Format(DateSerial(Year(Date),9,1), "mmm dd\, yyyy")

The backslash indicates that the next character is a literal.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Sue" <sm*****@notmyemail.com> wrote in message
news:t5******************@newsread3.news.atl.earth link.net...
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


Nov 13 '05 #3

P: n/a
Sue
Allen,

This works!

Chr(34) & Format(DateSerial(Year(Date),9,1), "mmm dd, yyyy") & Chr(34)

Sue

"Allen Browne" <Al*********@SeeSig.Invalid> wrote in message
news:41***********************@per-qv1-newsreader-01.iinet.net.au...
Try:
Format(DateSerial(Year(Date),9,1), "mmm dd\, yyyy")

The backslash indicates that the next character is a literal.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Sue" <sm*****@notmyemail.com> wrote in message
news:t5******************@newsread3.news.atl.earth link.net...
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


Nov 13 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.