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 MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple update and make table queries

Status
Not open for further replies.

NLucy

Programmer
Aug 6, 2004
3
IE
I am manipulating data in MS Access SQL and I have manipulated the data in several steps (make tables, update queries etc.). How do I combine these queries? subqueries won't work for the updates I have to do as the updates are based on several criteria and it's not recognising the IIf statement? Any thoughts?
 
Hi, that is not much to go on, but if you mean running several queries conditionally from one command, you might try something like:

Private Sub cmdRunQry_Click()

docmd.setwarnings false

If YourCondition = true then

DoCmd.OpenQuery "Qry1", acViewNormal
DoCmd.OpenQuery "Qry2", acViewNormal

Else:

DoCmd.OpenQuery "Qry3", acViewNormal
DoCmd.OpenQuery "Qry4", acViewNormal

End If

docmd.setwarnings true

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top