I have a form with a button 'btnOpenRecordset' with the folling code:
Private Sub btnOpenRecordset_Click()
Dim rs As Recordset
Dim strLastName As String
Set rs = CurrentDb.OpenRecordset("Select * tblPeople where fTxtFirstName=Loy")
While Not rs.EOF
strLastName = "Last Name: " & rs!fTxtLastName
rs.MoveNext
Wend
rs.Close
Set rs = Nothing
End Sub
This produces the error '3075' - Syntax error (missing operator) in query expression'*tlPeople where fTxtFirstName=Loy'
Can you give me some help?