Full Version: Code blowing up on Timer Event
UtterAccess Forums > Microsoft® Access > Access Forms
aldeb
Below is the code I have on a Timer Event that is supposed to take me to the Last EcnNbr that I was on before
the requery. I keep getting the following error:
I am totally stumped and hope someone can help me understand what is wrong. I have
this same code on another Form and it works just fine. Hopefully this is just something stupid
I have done but I sure can't figure it out. PLEASE HELP!
CODE
Private Sub Form_Timer()
trCtlName = Screen.ActiveControl.Name
'Record
intID = Me.EcnNbr
Me.Requery
'Go to record
Me.Recordset.FindFirst "EcnNbr=" & intID
'Go to control
DoCmd.GoToControl strCtlName
End Sub
pbaldy
As resolved elsewhere:
e.Recordset.FindFirst "EcnNbr='" & intID & "'"
aldeb
FYI,
got the below code from another forum and it works.
CODE
Me.Recordset.FindFirst "EcnNbr='" & intID & "'"
aldeb
Thanks very much Paul
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.