update a table from a listbox with SQL

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

On my form (Frm:BillingWorksheetMultiples) I have 2 listboxes.
The first listbox (list1) has as it's rowsource:

SELECT dbo_Clients.ID, dbo_Clients.Cltnum, dbo_Clients.CltEng,
dbo_Clients.CltnameFROM dbo_Clients ORDER BY dbo_Clients.Cltnum,
dbo_Clients.CltEng;

The other listbox (list2) has it's rowsource:

SELECT TempClient.CltID, TempClient.Cltnum, TempClient.CltEng,
TempClient.ClientName FROM TempClient;

The second list box comes from an empty, temporary table.

I want to create an "ON CLICK" event that takes the info in list 1 and
copies it into list 2. I then will add a button to the form that runs a
report based on the clients that were added to this temporary table.

I tried using:
DoCmd.RunSQL "Insert into TempClient ( CltID,Cltnum, CltEng,CltName )WHERE
(((dbo_Clients.ID)=[Forms]![Frm:BillingWorksheetMultiples]![List1]))"

I get a snytax error for INSERT INTO.

Can you help me??

Thanks!
 
Back
Top