AshikHusein
Registered User.
- Local time
- Today, 09:10
- Joined
- Feb 7, 2003
- Messages
- 147
I get error 3251 (Operation is not supported by this type of Object) when on the following part of the code.
rec.FindFirst "[acct_num] = """ & acct_str & """"
The full version of the code is as follows:
Private Sub acct_num_AfterUpdate()
Dim rec As DAO.Recordset
Dim db As Database
Set db = CurrentDb()
acct_str = [acct_num].Text
MsgBox (acct_str)
strtable = "tbl_order_entry_buy"
Set rec = db.OpenRecordset(strtable)
rec.FindFirst "[acct_num] = """ & acct_str & """" -->get an error here
If rec.NoMatch = True Then
MsgBox ("No Match")
rec.Close
Set rec = Nothing
Exit Sub
Else
MsgBox ("Matching record found")
rec.Close
Set rec = Nothing
Exit Sub
End If
End Sub
Would appreciate help as to what could be wrong.
rec.FindFirst "[acct_num] = """ & acct_str & """"
The full version of the code is as follows:
Private Sub acct_num_AfterUpdate()
Dim rec As DAO.Recordset
Dim db As Database
Set db = CurrentDb()
acct_str = [acct_num].Text
MsgBox (acct_str)
strtable = "tbl_order_entry_buy"
Set rec = db.OpenRecordset(strtable)
rec.FindFirst "[acct_num] = """ & acct_str & """" -->get an error here
If rec.NoMatch = True Then
MsgBox ("No Match")
rec.Close
Set rec = Nothing
Exit Sub
Else
MsgBox ("Matching record found")
rec.Close
Set rec = Nothing
Exit Sub
End If
End Sub
Would appreciate help as to what could be wrong.