Microsoft
Software
Hardware
Network
Question : Find and Delete a record on another table
I need to delete a record on another table based on the selected line on a list box. The third column of the listbox will be used as critreria to search on the other table. The table to be opened is called "Customer_Products", the listbox is called lstCustItemNum, and the field on the third column on the list is called Cust_Product_ID.
Any help will be greatly appreciated as I am a newbie.
Answer : Find and Delete a record on another table
You can delete a record like this:
Currentdb.Execute "DELETE * FROM Customer_Products WHERE Cust_Prod_ID=" & Me.lstCustItemNo.Column(2)
Columns are zero-based, so Column(2) refers to the 3rd column
Random Solutions
Public Folder Alerts
Set Subquery Parameter from query
Displaying the color index of a cell
Problem with a recently installed program not appearing in my All Programs List.
IF EXISTS, OUTPUT INTO
how to find MailboxGUID from an Exchange database
Cannot Edit SQL Query Results
Difference between "Address Space" and "Smart Hosts" in Exchange Send Connector
popup dialogue box for a query
PAGE_FAULT_IN_NONPAGED_ARE<wbr />A during Startup