Global bln_navigation As Boolean ' in a module
Private Sub Command22_Click() 'the button to navigate or to add
bl_navigation = True
DoCmd.GoToRecord , , acNext
End Sub
Private Sub Form_Current()
If bln_navigation = True Then 'got here through button
'your code here
bln_navigation = False
End If
End Sub
Open in new window