Hi Experts
I'm trying to find CustomerID's (in VB6) for customers from a specified post code who bought a specified item, and write the ID's into a separate table
Sep_Table: Columns = CustID
Cust_Details: Columns = CustID (no duplicates) , PostCode (text)
Cust_Sales: Columns = CustID (has duplicates) , ItemBought (text)
Being a newby, i don't have experience in this level of sql , but imagine it would be structured something like this. Need help with the full syntax though.
Dim CLIENTS as Recordset
**help here please**
' 'For each Cust_Details.ID
' 'If Cust_Details.PostCode = "SpecifiedPostCode" AND Cust_Sales.Item = "SpecifiedItem"
' 'then insert PatID into Sep_Table
Set CLIENTS = CURDB.OpenRecordset(SQL, dbOpenSnapshot)
DoEvents
Many thanks
Peter
Start Free Trial