Strange problem with ComboBox in a Form

  • Thread starter Thread starter Amit
  • Start date Start date
A

Amit

Hi,

Will appreciate any help with this.

I designed a form based on a query that selects fields
from 2 tables, connected by a foreign key. This form is
used to enter employee information. It works fine.

Now, I added an unbound combo-box in the footer of the
same form and used the Combo Box Wizard to find a record
based on the value selected, and then
selected "PersonFirstName" from the list of available
fields. As soon as I do that, I get the following error:

" Syntax error in query expression '[Select [tblPerson]].
[PersonID]' ".

I'm not sure what's causing this error. I can see that the
syntax is incorrect, but:
a. I'm not selecting [PersonID]
b. where can I correct this syntax?? I've checked the code
for the form, and also the 'Properties' section for the
combobox, but didn't find any code corresponding to the
error message.

Any help on this will be appreciated.

Thanks!

-Amit
 
As it reads you seem to be connecting the unbound Combo box based on the
underlying query in which the form is based. This won't work. A combo box
used to Find a record needs to be based on the master table. Thus if you
have an Order form open and you want to find a particular customer; the
combo source field should be based on the Customer table not the data in the
Order table.
 
Back
Top