Q: Run 2 queries from one button problem

J

Jim

Hello. My onclick-code for the button is as follows:

Dim stDocName As String

DoCmd.SetWarnings False

If MsgBox("Really delete all?", vbYesNo + vbQuestion, "Really delete
all?") = vbYes Then
DoCmd.OpenQuery stDocName, acNormal, acEdit
End If

stDocName = "qry_radera_alla_fakturor"
DoCmd.OpenQuery stDocName, acNormal, acEdit
stDocName = "qry_radera_alla_kunder"
DoCmd.OpenQuery stDocName, acNormal, acEdit

DoCmd.SetWarnings True

-But when tryin' to run this I get: "the action or method requires a query
name argument". What am I missing??
 

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