malkasoft10
03-21-2007, 06:44 AM
Hi brothers
i have acc table with following field
acc_no text
acc_name text
balance number
Dim bab As DAO.Recordset
Set db = CurrentDb
Set bab = db.OpenRecordset("acc", dbOpenDynaset)
Dim strCriteria As string
strCriteria = "[acc_no] =" & Me.Acc_no1
bab.FindFirst (strCriteria)
If Not bab.NoMatch Then
bab.addnew
etc...
I use this code to find criteria and I got this message error
Run-time error '3464': Data type mismatch in criteria expression
in bab."FindFirst (strCriteria)" line
I know why this message its because use of text field in the acc table
But my project need text field rather than number field
So how can I using find first with text field
thanks
i have acc table with following field
acc_no text
acc_name text
balance number
Dim bab As DAO.Recordset
Set db = CurrentDb
Set bab = db.OpenRecordset("acc", dbOpenDynaset)
Dim strCriteria As string
strCriteria = "[acc_no] =" & Me.Acc_no1
bab.FindFirst (strCriteria)
If Not bab.NoMatch Then
bab.addnew
etc...
I use this code to find criteria and I got this message error
Run-time error '3464': Data type mismatch in criteria expression
in bab."FindFirst (strCriteria)" line
I know why this message its because use of text field in the acc table
But my project need text field rather than number field
So how can I using find first with text field
thanks