Example:
The form conatins 3 non-visible fields : Writer1, Writer2, Writer3
I would like the drop-down to display Writer1, Writer2, and Writer3 of the
current record.
Is there a way to have it displayed directly from the object's property
window (Row Source) ?
Set the Row Source Type of your combobox:
Row Source Type: Value List
Private Sub Form_Current()
Dim strList as string
strList = Me.Writer1 & ";" & Me.Writer2 & ":" & Me.Writer3
Me.YourCombobox.RowSource = strList
End Sub
--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
.
"BZeyger" <BZe...@discussions.microsoft.com> wrote in message
news:15DACAE6-C691-40E8...@microsoft.com...
strList = Me.Writer1 & ";" & Me.Writer2 & ";" & Me.Writer3
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
"John Spencer" <spe...@chpdm.edu> wrote in message
news:O7bLFxU...@TK2MSFTNGP04.phx.gbl...
The code provided does put the desired information into the drop-down box
but it does not place the full name on the same line.
What happens is: Smith
John
Doe
Jane
I would like it to show as : John, Smith
Jane Doe
"John Spencer" wrote:
> You could use the Current Event to set the comboboxes value list.
>
> Set the Row Source Type of your combobox:
> Row Source Type: Value List
>
> Private Sub Form_Current()
> Dim strList as string
> strList = Me.Writer1 & ";" & Me.Writer2 & ":" & Me.Writer3
> Me.YourCombobox.RowSource = strList
> End Sub
> --
> John Spencer
> Access MVP 2002-2005, 2007
> Center for Health Program Development and Management
> University of Maryland Baltimore County
> ..
strList = """" & Me.Writer1 & """;""" & Me.Writer2 & """;""" & Me.Writer3 &
""""
That's four double quotes in a row at the beginning and end, and three
double quotes on either side of the semi-colons.
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
"BZeyger" <BZe...@discussions.microsoft.com> wrote in message
news:D484156B-225D-4525...@microsoft.com...
If you are trying to get the three parts of ONE Name as choices in a
combobox then you probably need to use a query as the source for the
combobox where you have concatenated (added together) three fields
containing the name parts. You can combine the three fields in the
underlying query.
Field: FirstName & " " & MiddleName & " " & LastName
--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
.
"BZeyger" <BZe...@discussions.microsoft.com> wrote in message
news:5DF1EC96-BC0F-4E0C...@microsoft.com...