Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form Navigation and Update

Status
Not open for further replies.

stroll

Programmer
Sep 15, 2000
20
CA
We are trying to run an update query everytime the record navigation
buttons located at the bottom of the form are pressed. What form
event will allow us to achieve this.

Ryan
 
The OnCurrent event of the form that the record selectors are on.
 
Use the command button wizard to create a button that executes a query. If your command button is named command0 and your update query is named Query2, it will add code to the OnClick property of the button like this:

Private Sub Command0_Click()
On Error GoTo Err_Command0_Click

Dim stDocName As String

stDocName = "Query2"
DoCmd.OpenQuery stDocName, acNormal, acEdit

Exit_Command0_Click:
Exit Sub

Err_Command0_Click:
MsgBox Err.Description
Resume Exit_Command0_Click

End Sub



Hope this helps...

jjones@cybrtyme.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top