VB command (SORRY, continuation - because it's not working)

G

Guest

I have the following:

Private Sub runclients_Click()
DoCmd.OpenQuery “contactsappendtoclientsâ€, acViewNormal, acEdit
DoCmd.OpenQuery “deleteclientsfromcontactsâ€, acViewNormal, acEdit
DoCmd.OpenQuery “billinghelpappendâ€, acViewNormal, acEdit
DoCmd.OpenForm “clientsâ€
DoCmd.Close acForm, "contacts", acSaveNO

If I click on the command button to execute the above command no contact is
apppended to clients neither the contact which has to be appended is deleted.
If I close the form and open it again and run the command again everything
is working.
Why is it not working immidiately and how can I change that?
Thanks
Klaus
 
G

Guest

Try running it like this:

Private Sub runclients_Click()
DoCmd.OpenQuery “contactsappendtoclientsâ€
DoCmd.OpenQuery “deleteclientsfromcontactsâ€
DoCmd.OpenQuery “billinghelpappendâ€
DoCmd.OpenForm “clientsâ€
DoCmd.Close acForm, "contacts"

I'm assuming you are using appendqueries..

hth
 

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