Best way to send selected listbox values to a datasheet form (1 Viewer)

krissy21

Registered User.
Local time
Today, 06:17
Joined
Dec 8, 2016
Messages
21
Hello Everyone!

I'm not very proficient at Access but love it's capabilities. I've tried a few avenues but I think I'm making it harder than it may have to be.

I have a main order form to purchase items from various vendors and the OrderID is auto-populated. A person may choose a vendor and push the button to "View Items" for that vendor. Another form pops up with an listbox of those items and information. What I'm trying to do, is if an item in the listbox is double-clicked, I'd like that item to be transferred to a subform/subdatasheet on the same form where the person can enter the Qty and PurchasePrice. The thing of it is, I need the subform/subdatasheet able to list multiple items when selected from the listbox one at a time. Then I need to store that information in my table tblOrderItems.

I've attached a sample of my database for viewing. What would be the best way to do this? Thanks very much!
 

Attachments

  • Items.accdb
    656 KB · Views: 200

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 20:17
Joined
May 7, 2009
Messages
19,175
check your db.
 

Attachments

  • Items.accdb
    1.2 MB · Views: 225

krissy21

Registered User.
Local time
Today, 06:17
Joined
Dec 8, 2016
Messages
21
Wonderful! Thank you arnelgp! However, if I enter a Qty for Item #1 and another for item #2, it changes the Qty for Item #1 to what I entered for #2. The same goes for the column PurchasePrice. What do you suggest I should do there?
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 20:17
Joined
May 7, 2009
Messages
19,175
you must make the Bound. see the attached.
 

Attachments

  • Items.accdb
    1.2 MB · Views: 281

krissy21

Registered User.
Local time
Today, 06:17
Joined
Dec 8, 2016
Messages
21
Oh, I see. I had thought that by making those bound to the query, it wouldn't pull the correct information or only the first entry. Thank you, thank you! I learned a lot just now. :) Krissy
 

Users who are viewing this thread

Top Bottom