Delete Records From Temp Table

Local time
Today, 18:47
Joined
Apr 29, 2001
Messages
47
I am trying to delete records from a temp table using the following code.

CurrentDb().Execute "Delete * From tbl_temp_bank_statement Where [Original_Member_Number]= '" & Me![ListBoxGarther] & "'"

This does not work I get the following error.
Data type mismatch in criteria expression. (Error 3464)

Do I have to dim my "ListBoxGarther" value first.

Paul
 
Is your original_member_Number a string (text) field or a integer(number field), if it is a integer then you dont need the single quotes, somthing like this:

Code:
CurrentDb().Execute "Delete * From tbl_temp_bank_statement Where 
[Original_Member_Number]= " & Me![ListBoxGarther]

Data type mismatch errors usually mean that you have a text field compared to a number field but the oposite is also true... hope this helps.
 

Users who are viewing this thread

Back
Top Bottom