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
search method in VBA Access
The report server is not responding. Verify that the report server is running and can be accessed from this computer.
sql server login
Autofill Date Field in Access 2007
Visual Basic Code - Excel - Merge multiple worksheets in an excel workbook into single worksheet
Error in an SQL query
migrating SQL databases to another server and get some weird error messages
Suppress Message Box when creating output file
Vbs script to add specific user to group
Block DNS Lookups for certain domains