mrrayj60
Registered User.
- Local time
- Today, 17:42
- Joined
- Sep 3, 2009
- Messages
- 103
I have a form and subform, they are linked by the field License Tag Number, a text field in my table, vistorlog.
I enter a tag number to display of all the entries that equal this tag number and I get an error on the line noted **
Can anyone suggest a fix? Runtime error 438
Object doesnt support this property or method
Option Compare Database
Private Sub txtSearchReg_AfterUpdate()
Dim rs As DAO.Recordset
Dim frmAny As Form
If Len(Me.txtSearchReg & "") <> 0 Then 'Optional line
Set frmAny = Me.TEST2.Form
Set rs = frmAny.RecordsetClone
rs.FindFirst "[License Tag Number] = " & Chr(34) & Me.txtSearchReg & Chr(34)
'rs.FindFirst "[License_Tag_Number] = " & Me.txtSearchReg
If rs.NoMatch = False Then Me.Bookmark = rs.Bookmark
** frmAny.[License Tag Number].SetFocus
Me.txtSearchReg = Null
Else
'If desired
'Insert alternate code if txtSearchReg is null
End If 'Optional line
End Sub
I enter a tag number to display of all the entries that equal this tag number and I get an error on the line noted **
Can anyone suggest a fix? Runtime error 438
Object doesnt support this property or method
Option Compare Database
Private Sub txtSearchReg_AfterUpdate()
Dim rs As DAO.Recordset
Dim frmAny As Form
If Len(Me.txtSearchReg & "") <> 0 Then 'Optional line
Set frmAny = Me.TEST2.Form
Set rs = frmAny.RecordsetClone
rs.FindFirst "[License Tag Number] = " & Chr(34) & Me.txtSearchReg & Chr(34)
'rs.FindFirst "[License_Tag_Number] = " & Me.txtSearchReg
If rs.NoMatch = False Then Me.Bookmark = rs.Bookmark
** frmAny.[License Tag Number].SetFocus
Me.txtSearchReg = Null
Else
'If desired
'Insert alternate code if txtSearchReg is null
End If 'Optional line
End Sub