Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parameter in field that is a drop down box from table 2

Status
Not open for further replies.

houstonbill

Technical User
Nov 6, 2006
92
I am hoping someone can assist. I have taken over a database from an employee no longer with us. The database is nn use and I need to create the reports to go with it.

Problem is, that when I try to set specific criteria on the query field whose corresponding table has set the field as a drop down box I get an error that says "
Data Type Mismatch in Criteria Expression". Is there anyway around that?
 
You will need to change the criteria expression. It seems likely that you need single quotes, but without more information it is hard to say.
 
Lookup fields defined in table designs are considered a bad feature You may be viewing a text value when the actual stored value is a number.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Thanks Remou but the single quotes do not work either. Duane pointed me to a reference which clearly states:

"Any query that uses that lookup field to sort by that company name won't work. Nor will a query that uses a company name in that field as a criteria. If a user creates a combobox to select the company using a value list, the data in the table can be over-written."

Personally, I never set lookup fields on my tables.I was hoping not to do much rebuilding but I guess that will resolve my reporting issues.

Thanks for your quick responses.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top