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!
Dave - 18 Jan 2006 21:42 GMT
If you're using the list box to select multiple entries, check out Allen
Browne's web site for tips on constucting the SQL statement you need.
http://allenbrowne.com/ser-50.html
Hope this helps.
Dave
> On my form (Frm:BillingWorksheetMultiples) I have 2 listboxes.
> The first listbox (list1) has as it's rowsource:
[quoted text clipped - 23 lines]
>
> Thanks!