Hi,
New to this site, and hope i may be able to source some help. Im a bit rusty on my code knowlege:
I have a form with a cmd button with the following code behind it:
Private Sub Find_Click()
Me.RecordsetClone.FindFirst "[RecordNo] = " & Me![FindNo]
If .NoMatch Then
MsgBox "Audit Code Incorrect"
Else
Me.Bookmark = Me.RecordsetClone.Bookmark
End If
End Sub
I get a compile error saying 'invalid or unqualified reference.
Basically, the intension is for an operator to input a number into txt box 'FindNo' and then press cmd 'find'. Then the appropriate record from the 'record source' table is displayed. Other txt boxes on my form have their control set to other fields in the table. Without the If statement, the code works, but hopfully the reason for wanting an if statement will be clear, but i cant make it work? Any suggestions greatly appreciated,
Many thanks,
New to this site, and hope i may be able to source some help. Im a bit rusty on my code knowlege:
I have a form with a cmd button with the following code behind it:
Private Sub Find_Click()
Me.RecordsetClone.FindFirst "[RecordNo] = " & Me![FindNo]
If .NoMatch Then
MsgBox "Audit Code Incorrect"
Else
Me.Bookmark = Me.RecordsetClone.Bookmark
End If
End Sub
I get a compile error saying 'invalid or unqualified reference.
Basically, the intension is for an operator to input a number into txt box 'FindNo' and then press cmd 'find'. Then the appropriate record from the 'record source' table is displayed. Other txt boxes on my form have their control set to other fields in the table. Without the If statement, the code works, but hopfully the reason for wanting an if statement will be clear, but i cant make it work? Any suggestions greatly appreciated,
Many thanks,