Running an append query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,

I have a button that's supposed to run an appen query,but when i click on
this button nothing happens,when i double-click theb query ,it works
well,what's the reason of this problem and how can i solve it ?
Here's the code i'm using:
DoCmd.Openquery "qname"
I tried also to open it through a macroo but it does not work
 
Pietro,

Try using this construct:
On Error Resume Next
CurrentDb.Execute "qname", dbFailOnError
If (Err <> 0) Then
MsgBox Err.Number & vbCrLf & Err.Description
End If

....and see what (if any) error is reported. Fix the error.

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
 

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

Back
Top