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!

Query Question - How do I write an expression in Criteria

Status
Not open for further replies.

PhoneTech2

Technical User
Aug 12, 2002
16
US
I want to run a query with the results based on a value in a table not part of the query.

The table has only one record called MINIMUM

What is the format for such a critera, I have tried variations on the following:

=table!TableName!FieldName

But no matter how I write it, when I run the query it ask me to enter a value for FieldName.

Can someone show me the proper way to write the expression so that the query will look up the value.

Thank you.

 
Try this....

=table!TableName!ControlName

Change your FieldName with your ControlName.

Hope this helps.
 
FCCC

I am sorry. But I do not know what you mean by ControlName.

The table has only one field, and only one record. The table name is VMLimits and the Field name is Minimum.

Can you give me just another hint?

Thank you
 
How do you run this code? Are you using a form or a report?
 
I am clicking on the run ( ! ) command on the tool bar. When I get it working, it will be in a Report.
 
why don't you just put ="MINIMUM" on your query field. Please try if this is what you are trying to do.
 
I did not know you could do that.

I added the VMLimit table to the query.

I put the one field (minimum) into the query.

Under criteria I entered >=[minimum], and it worked.

Thank you
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top