I need some fresh eyes to take a look at this code for me and let me
know what it is I'm doing wrong because I keep getting all kinds of
error message with this code. I've had several people help me with this
code and every thing that've told me I've done but for the life of me I
can't seem to get this working right.
First I keep getting "Type mismatch" error message for this line of
code: StrProject = Str(Me!cboProjectID) but if I take out the str and
just have strProject = Me!cboProjectID it's fine.
Second I keep getting "Syntax error(missing operator) in experience in
this line of code:
rst.FindFirst "[cboProjectID] = '" & StrProject & "'" &
"[cboJurisdiction] ='" & StrState
This is the complete code:
Private Sub cmdFind_Click()
Dim rst As DAO.Recordset
Dim StrProject As String
Dim StrState As String
Set rst = Me.RecordsetClone
StrProject = Str(Me!cboProjectID)
StrState = Str(Me!cboJurisdiction)
rst.FindFirst "[cboProjectID] = '" & StrProject & "'" &
"[cboJurisdiction] ='" & StrState
If Not rst.NoMatch Then
MsgBox "Record Found"
Else
MsgBox "Not Found"
End If
Set rst = Nothing
End Sub
I've cross checked my code with other people code and it looks the
same, I also use the help sample code but I keep getting this message.
I know I'm missing something just not sure what.
Any help will be greatly appreciated.