opopanax666
Registered User.
- Local time
- Today, 01:14
- Joined
- Nov 2, 2006
- Messages
- 44
(solved) Use listboxes to organize records
Hello everyone,
I have a form with 2 listboxes: 1 to show the name of the products having a code "v" (recordsource query), 1 to show the name of the products having a code "a".
2 arrowed buttons (left-right) would make a product "jump" from one to the other.
The way I wanted to do this is, when the appropriate button is clicked, the actual product code is changed, then the listboxes refreshed, so that it looks that the product jumped listboxes (when the code changes and the listboxes refreshed/requeried, it will disappear in one and appear in the other, because of the recordsource queries).
I want to do it this way, because it is imperative that the code gets changed!
But I have no idea how to get the record of the selected product "out" of the listbox. When I select a product and check e.g. the ".value" of the listbox, it is "null"!?
So how to "get" the record corresponding with the selected item in a listbox in VBA?
Thanks in advance!
Hello everyone,
I have a form with 2 listboxes: 1 to show the name of the products having a code "v" (recordsource query), 1 to show the name of the products having a code "a".
2 arrowed buttons (left-right) would make a product "jump" from one to the other.
The way I wanted to do this is, when the appropriate button is clicked, the actual product code is changed, then the listboxes refreshed, so that it looks that the product jumped listboxes (when the code changes and the listboxes refreshed/requeried, it will disappear in one and appear in the other, because of the recordsource queries).
I want to do it this way, because it is imperative that the code gets changed!
But I have no idea how to get the record of the selected product "out" of the listbox. When I select a product and check e.g. the ".value" of the listbox, it is "null"!?
So how to "get" the record corresponding with the selected item in a listbox in VBA?
Thanks in advance!
Last edited: