Form Object as Query Criteria

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Access XP, Windows XP

I have a select query. In the criteria field, I want to use whatever is
selected in an unbound combo box on a form. The name of the form is
frmSenateReports. The name of the Combo Box is Combo37.

In the criteria field of the query I have entered the following:

[Forms]![frmSenateReports]![Combo37]

When I open the Senate Reports form and select a Senate District from the
Combo Box and click on the Preview Report button (This button runs a report
that is based on the select query), it displays "Error."

Any thoughts on what I am doing wrong??

Thanks for your help,

Jeff
 
First, you should have a name for your field that represents what it is. It
makes the programming more logical.

Anyway, can your query run independent of the report? Just trying to find
out if the error is in the report or the query. Look to make sure your data
types are the same between your unbound field and the field in the query. If
the query can run on its own, then perhaps your field on the report is not
based off a valid record source.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top