Re: Value List In Listbox

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Marshall Barton (marshbarton_at_wowway.com)
Date: 10/26/04


Date: Tue, 26 Oct 2004 14:41:12 -0500

Sue wrote:

>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.

-- 
Marsh
MVP [MS Access]


Relevant Pages

  • Re: Value List In Listbox
    ... Sue wrote: ... >list of a listbox, the month and day appear on one line and the year appears ... If I remove the comma after dd, the month, day and ... MVP ...
    (microsoft.public.access.formscoding)
  • Value List In Listbox
    ... list of a listbox, the month and day appear on one line and the year appears ... How can I write the format expression to ... include the comma to get Sep 1, 2004 all on the same line in the listbox? ... Sue ...
    (microsoft.public.access.formscoding)
  • Value List In Listbox
    ... list of a listbox, the month and day appear on one line and the year appears ... How can I write the format expression to ... include the comma to get Sep 1, 2004 all on the same line in the listbox? ... Sue ...
    (microsoft.public.access.gettingstarted)
  • RE: Using List Box to control Records in a Report
    ... "Dale Fye" wrote: ... Have seen it done with automatically adding a comma after each value is ... will create the WHERE clause if the function returns some values, ... IsSelected field in the table that is the source for your listbox. ...
    (microsoft.public.access.formscoding)
  • Re: Cannot multiselect programmatically?
    ... Why would your list items end with semicolon? ... comma-delimitd list but the comma is not part of the list value. ... > items in the listbox already selected by default when the form is loaded. ... How do I programmatically select multiple items in the list? ...
    (microsoft.public.fox.programmer.exchange)