Query Field Call Out

G

Guest

How do I call out a query field in a "If, Then, Else" loop? I have a field,
"Report Form Number" that I want to check the value of kinda like this:

If [queries]![main table query]![report form number] = 1 then
-and the report style associated with the catagory 1
the field value can be either the number 1, 2, 3, 4 or 5; relating to 5
different reports.
But nothing I've tryed works yet, even the above line, though it looks
impressive!
Thanks
 
G

Guest

I cant understand exactly what you trying to do
If you want to look for a report name using a report number the use the
dlookup
dlookup("[Report Name]","[main table query]","[report form number] = 1")

If you want to check that there is no report related to that number then

If isnull(dlookup("[Report Name]","[main table query]","[report form number]
= 1")) Then

What ever you trying to do, if you want to get one value from the query
using a criteria then use the dlookup,
 

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

Top