Hi
Can someone help me
In the subForm I have a dropdown box to Find the record that matches the control. This is the code I have and works on the form that is not a subform.
I get an msg that says Not found: filtered?" because this dropdown control is in a subForm.
I don't know how to reference that it is in a subform.
The Main Form ID is named - ModuleID
The Sub Form ID is named - QADocumentationID
DropDown box in the subform is named - FindItpNo
Private Sub FindItpNo_AfterUpdate()
' Find the record that matches the control.
Dim rs As DAO.Recordset
If Not IsNull(Me.FindItpNo) Then
'Save before move.
If Me.Dirty Then
Me.Dirty = False
End If
'Search in the clone set.
Set rs = Me.RecordsetClone
rs.FindFirst "[QADocumentationID] = " & Str(Me![FindItpNo])
If rs.NoMatch Then
MsgBox "Not found: filtered?"
Else
'Display the found record in the form.
Me.Bookmark = rs.Bookmark
End If
Set rs = Nothing
End If
End Sub
Thanks BBryan
Can someone help me
In the subForm I have a dropdown box to Find the record that matches the control. This is the code I have and works on the form that is not a subform.
I get an msg that says Not found: filtered?" because this dropdown control is in a subForm.
I don't know how to reference that it is in a subform.
The Main Form ID is named - ModuleID
The Sub Form ID is named - QADocumentationID
DropDown box in the subform is named - FindItpNo
Private Sub FindItpNo_AfterUpdate()
' Find the record that matches the control.
Dim rs As DAO.Recordset
If Not IsNull(Me.FindItpNo) Then
'Save before move.
If Me.Dirty Then
Me.Dirty = False
End If
'Search in the clone set.
Set rs = Me.RecordsetClone
rs.FindFirst "[QADocumentationID] = " & Str(Me![FindItpNo])
If rs.NoMatch Then
MsgBox "Not found: filtered?"
Else
'Display the found record in the form.
Me.Bookmark = rs.Bookmark
End If
Set rs = Nothing
End If
End Sub
Thanks BBryan