Delete command from a list box

HowardChr

Noob
Local time
Today, 05:15
Joined
Apr 26, 2007
Messages
35
I have a list box (List0) which is pulling in information from a table. I would like it so when a command button is pressed, the selected option in the list is deleted out of the table, along with an autonumber with it. (This would be deleteing the entire row). I am working with the following code:

Code:
DoCmd.Execute "DELETE * FROM [Input] WHERE [Loc_Desc] VALUES (""" & Me.List0 & """)", dbFailOnError

When I try to run this, I am getting an error message: "Method or data member not found" and is is highliting the (.List0) part in the following: DoCmd.Execute "DELETE * FROM [Input] WHERE [Loc_Desc] VALUES (""" & Me.List0 & """)", dbFailOnError

Any ideas where I'm heading wrong?
 

Users who are viewing this thread

Back
Top Bottom