G
Guest
Hello
I have a form linked to a subform via user ID. I am trying to find a record in the subform based on the user's ID and the date, but I'm getting a type mismatch error that doesn't make sense to me. Here's my code
Private Sub Date_AfterUpdate(
Dim searchDate As Dat
Dim searchUser As Strin
Dim frm As For
Dim rs As Recordse
searchDate = Me!Dat
searchUser = Me!Logo
Set frm = Me.DE_Subform.For
Set rs = frm.RecordsetClon
frm.RecordsetClone.FindFirst "Date = #" & searchDate
"# And [User ID] = '" & searchUse
If frm.RecordsetClone.NoMatch The
Me.Und
MsgBox "Record not found
Els
frm.Bookmark = recSet.Bookmar
End I
End Su
When I type in a date on the form, I get the following error message: "Run-time error '13' Type mismatch" and when I go to debug, it highlights the line "Set rs = frm.RecordsetClone
This makes no sense to me. Any ideas
Thanks
Carrie
I have a form linked to a subform via user ID. I am trying to find a record in the subform based on the user's ID and the date, but I'm getting a type mismatch error that doesn't make sense to me. Here's my code
Private Sub Date_AfterUpdate(
Dim searchDate As Dat
Dim searchUser As Strin
Dim frm As For
Dim rs As Recordse
searchDate = Me!Dat
searchUser = Me!Logo
Set frm = Me.DE_Subform.For
Set rs = frm.RecordsetClon
frm.RecordsetClone.FindFirst "Date = #" & searchDate
"# And [User ID] = '" & searchUse
If frm.RecordsetClone.NoMatch The
Me.Und
MsgBox "Record not found
Els
frm.Bookmark = recSet.Bookmar
End I
End Su
When I type in a date on the form, I get the following error message: "Run-time error '13' Type mismatch" and when I go to debug, it highlights the line "Set rs = frm.RecordsetClone
This makes no sense to me. Any ideas
Thanks
Carrie