By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,835 Members | 1,959 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,835 IT Pros & Developers. It's quick & easy.

listbox??

P: n/a
Hello,

Forgive me if I don't know the proper terminology. I have two
listboxes on a form -- one listbox with values in which users can
select from and one listbox blank. Upon clicking on a value, I want
the value to be removed from the value list and appear on the formerly
blank list box and vice versa.

Can anyone show me how this is done in Access 2000? I am ok at best in
vba. Any help is greatly appreciated.

Nov 13 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On 17 Jan 2005 17:47:20 -0800, re*******@hotmail.com wrote:

I like to do that this way:
Both listboxes get their data from the same table. This table has a
field called ID (primary key value), a Description field, and one
called Selected (yes/no). The first one's rowsource is:
select * from MyListTable where Selected = False
The second one:
select * from MyListTable where Selected = True

The process of moving one element over to the second list involves
running an update query to set the Selected flag:
update MyListTable set Selected=True where ID=Forms!MyForm!MyListbox1
and then requery both lists:
MyListbox1.Requery
MyListbox2.Requery

In a multi-user environment there are a few more considerations. There
it may be better to keep the list of selections in a separate table
with a UserName or MachineName field.

-Tom.

Hello,

Forgive me if I don't know the proper terminology. I have two
listboxes on a form -- one listbox with values in which users can
select from and one listbox blank. Upon clicking on a value, I want
the value to be removed from the value list and appear on the formerly
blank list box and vice versa.

Can anyone show me how this is done in Access 2000? I am ok at best in
vba. Any help is greatly appreciated.


Nov 13 '05 #2

P: n/a
I will give this a try. Thanks Tom!

Nov 13 '05 #3

P: n/a
I will give this a try. Thanks Tom!

Nov 13 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.