Formatting Value List

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sue

    Formatting Value List

    When I try to use the following expression,
    Format(DateSeri al(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


  • Allen Browne

    #2
    Re: Formatting Value List

    Try:
    Format(DateSeri al(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" <smillin@notmye mail.com> wrote in message
    news:t5tfd.1000 6$ta5.8873@news read3.news.atl. earthlink.net.. .[color=blue]
    > When I try to use the following expression,
    > Format(DateSeri al(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
    >
    >[/color]


    Comment

    • Sue

      #3
      Re: Formatting Value List

      That did not work either, Allen.

      Sue


      "Allen Browne" <AllenBrowne@Se eSig.Invalid> wrote in message
      news:417e6787$0 $13756$5a62ac22 @per-qv1-newsreader-01.iinet.net.au ...[color=blue]
      > Try:
      > Format(DateSeri al(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" <smillin@notmye mail.com> wrote in message
      > news:t5tfd.1000 6$ta5.8873@news read3.news.atl. earthlink.net.. .[color=green]
      > > When I try to use the following expression,
      > > Format(DateSeri al(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[/color][/color]
      and[color=blue][color=green]
      > > 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[/color][/color]
      listbox?[color=blue][color=green]
      > >
      > > Thanks!
      > >
      > > Sue
      > >
      > >[/color]
      >
      >[/color]


      Comment

      • Sue

        #4
        Re: Formatting Value List

        Allen,

        This works!

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

        Sue



        "Allen Browne" <AllenBrowne@Se eSig.Invalid> wrote in message
        news:417e6787$0 $13756$5a62ac22 @per-qv1-newsreader-01.iinet.net.au ...[color=blue]
        > Try:
        > Format(DateSeri al(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" <smillin@notmye mail.com> wrote in message
        > news:t5tfd.1000 6$ta5.8873@news read3.news.atl. earthlink.net.. .[color=green]
        > > When I try to use the following expression,
        > > Format(DateSeri al(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[/color][/color]
        and[color=blue][color=green]
        > > 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[/color][/color]
        listbox?[color=blue][color=green]
        > >
        > > Thanks!
        > >
        > > Sue
        > >
        > >[/color]
        >
        >[/color]


        Comment

        Working...