G
Guest
I have a table with a 4 character code defined as text in the table. At
present all the codes are 4 digit numbers, but I do not want to restrict this
field to numerica only. I am trying to select a record based on the 4
character code.
I defined a text box on a form and a Find command button. The code is as
follows:
dim rs as recordset
set rs = CurrentDB.Openrecordset("Select * from [Benefits_Contacts] " & _
"where [Benefits_Contacts.Code] = " & txtFind.value)
I get error 3464 data type mismatch in Criteria expression.
I changed the data type of Benefits_Contacts.Code to integer and the select
worked. However, I don't want this field defined as integer. txtFind is
just an ordinary text box.
present all the codes are 4 digit numbers, but I do not want to restrict this
field to numerica only. I am trying to select a record based on the 4
character code.
I defined a text box on a form and a Find command button. The code is as
follows:
dim rs as recordset
set rs = CurrentDB.Openrecordset("Select * from [Benefits_Contacts] " & _
"where [Benefits_Contacts.Code] = " & txtFind.value)
I get error 3464 data type mismatch in Criteria expression.
I changed the data type of Benefits_Contacts.Code to integer and the select
worked. However, I don't want this field defined as integer. txtFind is
just an ordinary text box.