three listboxes from same table question

  • Thread starter rsbutterfly16 via AccessMonster.com
  • Start date
R

rsbutterfly16 via AccessMonster.com

hi guys, i was wondering if you can help me. I have a data entry form in
which the user has three listboxes from ONE existing table . i want the user
if he/she selects an item from listbox1 or listbox2 or listbox3, then not to
display in the other listboxes, how can i do this? vba code?

this is my form:

Please select your three items of choice.

table name. items.

1st choice 2ndchoice 3rdchoice
listbox1 listbox2 listbox3


listbox1.value cannot equal listbox2.value and cannot equal listbox3.value.
 
L

Lynn Trapp

1. Set the rowsource for listbox1 to the values you need.
2. Set the rowsource for listbox2 to be the same with the exception that in
the bound column for the list box put the following criteria -- <>
Forms!YourFormName!YourListbox.
3. In the click event of listbox1 add the following code --
Me.Listbox2.Requery.
4. Repeat for listbox3 but you will need to make it <> to both listboxes.

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conradsystems/accessjunkie.html
 
R

rsbutterfly16 via AccessMonster.com

thank you so much, however when i try to do put the criteria in the bound
column of the listbox2 i get an error message that says "the value you
entered isn't valid for this field"

Lynn said:
1. Set the rowsource for listbox1 to the values you need.
2. Set the rowsource for listbox2 to be the same with the exception that in
the bound column for the list box put the following criteria -- <>
Forms!YourFormName!YourListbox.
3. In the click event of listbox1 add the following code --
Me.Listbox2.Requery.
4. Repeat for listbox3 but you will need to make it said:
hi guys, i was wondering if you can help me. I have a data entry form in
which the user has three listboxes from ONE existing table . i want the
[quoted text clipped - 14 lines]
listbox1.value cannot equal listbox2.value and cannot equal
listbox3.value.
 
L

Lynn Trapp

Perhaps I wasn't quite clear. Find the RowSource for your listbox2. Click
the button to the right of the field and that will open the query that is
behind it. THAT's where you put the name of listbox1.

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conradsystems/accessjunkie.html



rsbutterfly16 via AccessMonster.com said:
thank you so much, however when i try to do put the criteria in the bound
column of the listbox2 i get an error message that says "the value you
entered isn't valid for this field"

Lynn said:
1. Set the rowsource for listbox1 to the values you need.
2. Set the rowsource for listbox2 to be the same with the exception that
in
the bound column for the list box put the following criteria -- <>
Forms!YourFormName!YourListbox.
3. In the click event of listbox1 add the following code --
Me.Listbox2.Requery.
4. Repeat for listbox3 but you will need to make it said:
hi guys, i was wondering if you can help me. I have a data entry form in
which the user has three listboxes from ONE existing table . i want the
[quoted text clipped - 14 lines]
listbox1.value cannot equal listbox2.value and cannot equal
listbox3.value.
 
R

rsbutterfly16 via AccessMonster.com

thank you so much Lynn!!! have a great day
Lynn said:
Perhaps I wasn't quite clear. Find the RowSource for your listbox2. Click
the button to the right of the field and that will open the query that is
behind it. THAT's where you put the name of listbox1.
thank you so much, however when i try to do put the criteria in the bound
column of the listbox2 i get an error message that says "the value you
[quoted text clipped - 14 lines]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top