Update Query

R

Roger Bell

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

Top