If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Using a query result in an expression
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. |
#2
|
|||
|
|||
Using a query result in an expression
Phil
In queries, you use the IIF() function to accomplish If...Then...Else. -- Good luck Jeff Boyce Access MVP |
#3
|
|||
|
|||
Using a query result in an expression
You can retrieve the results of a query using a domain aggregate function
such as DLookup(). If DLookup("YourField","YourQuery") = -1 Then -- Duane Hookom MS Access MVP "Phil Hood" wrote in message ... 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. |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Hidden files in Ms-Query cause ODBC connect errors or Query is wac | needyourhelp | General Discussion | 4 | July 12th, 2004 09:38 PM |
Delete Query based on result of select query | John Finch | Running & Setting Up Queries | 1 | July 2nd, 2004 05:47 PM |
Display a query result in form | Le Tran | New Users | 0 | June 15th, 2004 09:08 PM |
query field reference help | -dch | Running & Setting Up Queries | 4 | June 2nd, 2004 07:30 PM |
Readding Numerical value to ext | Hoang Han | Worksheet Functions | 2 | December 4th, 2003 05:37 PM |