JCJG
asked on
Access 2007:Query change based on other criteria
I have the below query set up and I would like to add a condition to perform a different query based on a field value in another table.
Specifically, if [Table4].[Test] has one of its values, equal to "*", I would like to return [qry3].[Cust ID]; otherwise perform the following.
SELECT [Table1].[Cust ID] INTO [NewTable]
FROM [qry1] INNER JOIN [qry2] ON [qry1].[ Cust ID] = [qry2].[ Cust ID];
How do I modify the query to do this? Thanks.
Specifically, if [Table4].[Test] has one of its values, equal to "*", I would like to return [qry3].[Cust ID]; otherwise perform the following.
SELECT [Table1].[Cust ID] INTO [NewTable]
FROM [qry1] INNER JOIN [qry2] ON [qry1].[ Cust ID] = [qry2].[ Cust ID];
How do I modify the query to do this? Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
The macro design view has a conditions column you can turn on, then you can do an if this do that, if that do this....
Chris B
Chris B
http://www.utterangel.com/UtterAngel/utterangel.aspx?cat=acc