Using a query result in an expression

  • Thread starter Thread starter Phil Hood
  • Start date Start date
P

Phil Hood

I have a query that checks to see whether a record already
exists in a particular table. The result if it does is
that Expr1 = -1

My question is how do I refer to this result and use it in
an expression?

What I'm looking to do is to open a different form if the
result is -1 so I was thinking of using a If/Then/Else
statement but I don't know how to refer to the result of
the query in the 'if' statement.

Any help would be appreciated.

Thanks

Phil.
 
You can retrieve the results of a query using a domain aggregate function
such as DLookup().
If DLookup("YourField","YourQuery") = -1 Then
 
Back
Top