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
Received error "ActiveX component can't create object" while calling WinFax.SDKSend in VBA
Click event overrides DblClick event
Need SQL Syntax help to make my qry more efficient.
Is there a way of inserting hyphens (-) into all of the existing phone numbers contained in my Outlook 2007 contacts list? So the format will be 123-456-7890 instead of 1234567890
Loading images from directory into 5 Pictureboxes HOW?
Generic path to open a file from VBA
SQL Select problem...need records with "best match" returned in order
How to link a signature image to a web page in Outlook 6 signature
SSRS - How can I increase a multi-value param dropdown? Got to be a way
Using runtime themes on XP Embedded