Good morning all.
Randomly our DB forms are requerying without rhyme or (known) reason. This making the record jump back to record 1.
I want to create some code and store it in the Form's current event.
I have the following code:
Private Sub Form_Current()
Dim Num As Long
If Me.Requery Then ' Test for random requery
MsgBox "Requeried"
DoCmd.GoToRecord acDataForm, "[table name]", acGoTo, Num
Else
Num = Me.CurrentRecord
End If
End Sub
I also created a command button on the form with the following code to simualte the record jumping: Me.Requery.
The problem is, when I test for the requery (If Me.Requery Then ' Test for random requery), I get an error.
Any suggestions?
Thnak you,
Picard012
Randomly our DB forms are requerying without rhyme or (known) reason. This making the record jump back to record 1.
I want to create some code and store it in the Form's current event.
I have the following code:
Private Sub Form_Current()
Dim Num As Long
If Me.Requery Then ' Test for random requery
MsgBox "Requeried"
DoCmd.GoToRecord acDataForm, "[table name]", acGoTo, Num
Else
Num = Me.CurrentRecord
End If
End Sub
I also created a command button on the form with the following code to simualte the record jumping: Me.Requery.
The problem is, when I test for the requery (If Me.Requery Then ' Test for random requery), I get an error.
Any suggestions?
Thnak you,
Picard012