myaccess2000
Technical User
Hi,
i have the error pop up and the error is "data type mismatch in criteria expression". It shows that there is something wrong with my SQL statement and i can't figure out what is wrong with that.
date1.text is the value in my textbox and i intend to use the date in the textbox to look for that particular record and perform deletion. What is the root cause of the above error?
i = CDate(Date1.Text)
Set dbs = CurrentDb
dbs.Execute ("DELETE FROM Pay_info where emp_date = '" & i & "'"
dbs.Close
Regards
irene
i have the error pop up and the error is "data type mismatch in criteria expression". It shows that there is something wrong with my SQL statement and i can't figure out what is wrong with that.
date1.text is the value in my textbox and i intend to use the date in the textbox to look for that particular record and perform deletion. What is the root cause of the above error?
i = CDate(Date1.Text)
Set dbs = CurrentDb
dbs.Execute ("DELETE FROM Pay_info where emp_date = '" & i & "'"
dbs.Close
Regards
irene