View Full Version : error


Purdue22
05-14-2001, 04:43 AM
I am getting an, "Operation is not supported for this type of object", 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-14-2001, 05:32 AM
is the name of your field in the table dealer? and is the name of the combo box Dealer? if so, this should work. if you're still having problems, could you email me the database to take a look at?

charityg
05-15-2001, 04:07 PM
The problem was a different issue, but for anyone interested, the problem with the code was
Set rst = db.OpenRecordset("Dealer Info")
should have been:
Set rst = db.OpenRecordset("Dealer Info",dbopendynaset)