Update Query

G

Guest

I have designed and update query which resets fields to zero and an Onclick
event procedure as follows:

Private Sub RESET_ENTRIES_Click()
On Error GoTo Err_RESET_ENTRIES_Click
DoCmd.RunCommand acCmdSaveRecord

Dim stDocName As String

stDocName = "RESET CALCULATOR"
DoCmd.OpenQuery stDocName, acNormal, acEdit

Exit_RESET_ENTRIES_Click:
Exit Sub

Err_RESET_ENTRIES_Click:
MsgBox Err.Description
Resume Exit_RESET_ENTRIES_Click

End Sub

The problem is that when this button is clicked to reset, I find that I have
to click in any field with the mouse or exit and come back in for the event
to happen. Is there something I am missing or can add so that the Query will
work immediately?

Thanks for any help
 

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

Similar Threads

Update Query 1
How to make one button to update 3 queries 9
Command Button Not Executing 24
trouble with requery 3
Access 2002 MAR not opening in 2003 4
1st VBA sequence 6
filter on command 1
Select/Update query 1

Top