Add records to table using Listbox

misternumbertwo

Registered User.
Local time
Today, 08:09
Joined
Dec 29, 2008
Messages
11
Hi everyone,

Im trying to modify a database that generates invoices. Im having a problem in adding items coming from an ItemsTable to a SelectedItemsTable. Since the numbers of items are too many, i decided to use a search form that will search the ItemsTable for the Item that the user wants to add. The results of the search are propagated in a listbox.

Now, what I want to happen is when a user selects an Item on the Listbox and click a command button (let's say cmdAddThisItem), I want that Item to be added to the SelectedItemsTable. Im trying to use an Update query and setting the "Update to" field to forms!frmSearchAdd!List1 but its not working and I keep getting 0 fields to update.

Can anyone suggest another way to do this? I'm not very well versed at VBA coding yet that's why Im trying to do it this way.

Thanks everyone.
 
works like a charm! modified a few codes but it fits exactly what i needed.

Thank you so much Pbaldy!
 
No problem, glad it worked for you.
 

Users who are viewing this thread

Back
Top Bottom