View Full Version : end of statement error


Purdue22
05-11-2001, 10:55 AM
I am getting an, Expected: end of statement, error when I try to execute the code below. The line that it stops on is:
rst.Findfirst"[dealer]='" & Dealer&"'"

Any suggestions


Private Sub Dealer_AfterUpdate()
Dim db As Database
Dim rst As Recordset
Set db = CurrentDb
Set rst = db.OpenRecordset("Dealer Info")
rst.FindFirst "[dealer]='" & Dealer& "'"
With rst
If .NoMatch Then
MsgBox "Dealer not found!"
Else
Me!fax = !fax
Me!tc = !tc
Me!phone = !phone
End If
End With
End Sub

charityg
05-11-2001, 12:31 PM
rst.FindFirst "[dealer]='" & Dealer & "'"
you didn't have a space between Dealer and & in the string.