I have a combo box, (text box), called fakemodel that queries the Catalog tbl for Model # s.
After update, I want to check the Catalog tbl to see if that Model # has been entered.
I get a type mismatch at the line:strID = Trim(Str(Me.fakemodel))
PS. I was not the one who named that field Model #, and it's way too late in the game to change it now.
If Not IsNull(Me.fakemodel) Then
strRst = "Catalog"
strID = Trim(Str(Me.fakemodel))
Set rstData = dbData.OpenRecordset(strRst, dbOpenDynaset)
strCriteria = "[Model #] = " & strID
rstData.FindFirst strCriteria
If Not rstData.NoMatch Then
MsgBox "a match"
Else
MsgBox "no match"
End If
Else
End If
After update, I want to check the Catalog tbl to see if that Model # has been entered.
I get a type mismatch at the line:strID = Trim(Str(Me.fakemodel))
PS. I was not the one who named that field Model #, and it's way too late in the game to change it now.
If Not IsNull(Me.fakemodel) Then
strRst = "Catalog"
strID = Trim(Str(Me.fakemodel))
Set rstData = dbData.OpenRecordset(strRst, dbOpenDynaset)
strCriteria = "[Model #] = " & strID
rstData.FindFirst strCriteria
If Not rstData.NoMatch Then
MsgBox "a match"
Else
MsgBox "no match"
End If
Else
End If