CaptainBob007
Programmer
Hi -
I have a rather simple form that should run some rather simple code, but I keep on getting an error - more on that later.
I have a form with a field
, where a permit number is entered. Once it is entered and the appropriate button clicked, the record with the corresponding permit number will have its
field changed to TRUE. (PickedUp is a boolean value, PerNum is text). The code is below.
When I run this, I get an error 3464 "data type mismatch in expression". The Line below is highlighted:
As I said before, PerNum is a text field, and it's a simple comparison - I cant figure out why it'd be a mismatch. I do have DAO 3.6 object library enabled, so I know that can't be the cause of the problem. Any advice would be greatly appreciated.
~Bob
I have a rather simple form that should run some rather simple code, but I keep on getting an error - more on that later.
I have a form with a field
Code:
PerNum
Code:
PickedUp
Code:
Dim db As DAO.Database
Dim rcdPerIssued As DAO.Recordset
Set db = CurrentDb
Set rcdPerIssued = db.OpenRecordset("qryPermitsIssued")
rcdPerIssued.FindFirst "PerNum = " & Me.PerNum
If Not rcdPerIssued.NoMatch Then
rcdPerIssued.Edit
rcdPerIssued![PickedUp] = True
rcdPerIssued.Update
Else
MsgBox "This permit number has not yet been issued", vbExclamation, "Permit Not Issued"
End If
When I run this, I get an error 3464 "data type mismatch in expression". The Line below is highlighted:
Code:
rcdPerIssued.FindFirst "PerNum = " & Me.PerNum
~Bob