On 13 Apr 2004 15:50:49 -0700, Pauline Liu wrote:
Hi,
How do you reference a combo box first column in a query as a
parameter?
For example, in MyQuery in Name column, I want to put down as a
parameter from the first column of a combo box in the login form, like
this:
Name
[Forms]![frmLogin]![cboUsername].Column(1)
In the combo box: column (0) is the ID number, column (1) is the
name.
It doesn't work.
Thank you for your attention.
Pauline
Don't use the [Name] field to find records use the [NameID] field.
Add the [NameID] field to the query. Then use
[Forms]![frmLogin]![cboUsername]
as criteria in the [NameID] column.
The actual [Name] field will display the name while the [NameID] is
used to find the records.
I hope you do not have a field actually named "Name".
"Name" is a reserved key word in Access/VBA and should not be used as
a field name.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.