If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
combo box selection
I have a combo box (cbo2) and a list box (lbo1) that are filtered depending
on the selection in a third combo box (cbo1). The boxes are filtering correctly but there is a problem and a question: Problem - cbo2 does not allow me to make a selection even though I can see the options. Question - I want the user to be able to select either something in cbo2 or lbo1. How do I accomplish this? thank you, -- javablood |
#2
|
|||
|
|||
combo box selection
For your cbo2 problem, is the bound field enabled and not locked? Is the
field it is bound to updateable (e.g. not a 'one' field on a one-to-many join)? For your question, what determines which one the user can select from? If it is based on a field value or other selection, then you can either hide (.visible property) or inactivate (.enabled property) either control. If it is based on whichever the user has chosen, then on your BeforeUpdate event of either control, if the user has selected a value, then you can either hide or disable the other control. This would also require you to test conditions when old records are displayed to know if either control needs adjusting. -- Daryl S "javablood" wrote: I have a combo box (cbo2) and a list box (lbo1) that are filtered depending on the selection in a third combo box (cbo1). The boxes are filtering correctly but there is a problem and a question: Problem - cbo2 does not allow me to make a selection even though I can see the options. Question - I want the user to be able to select either something in cbo2 or lbo1. How do I accomplish this? thank you, -- javablood |
#3
|
|||
|
|||
combo box selection
Daryl,
Thanks for responding. I fixed the first problem. I just rebulit the cbo from scratch and it works. On the second problem, the user has a choice from either a cbo or lbo both of which have the RecordSource to the same table but different fields in that table. Once the selections are made another form is made (based on a query) to view the results. So the query has the two different fields linked to the main form by [Forms]![formname]![cbo]. Right now I only link one of the fields because I do not know how to link them both and have the query choose. I understand what you are saying (I think) about disabling a control but how do I have my query make the "either or" decision? -- javablood "Daryl S" wrote: For your cbo2 problem, is the bound field enabled and not locked? Is the field it is bound to updateable (e.g. not a 'one' field on a one-to-many join)? For your question, what determines which one the user can select from? If it is based on a field value or other selection, then you can either hide (.visible property) or inactivate (.enabled property) either control. If it is based on whichever the user has chosen, then on your BeforeUpdate event of either control, if the user has selected a value, then you can either hide or disable the other control. This would also require you to test conditions when old records are displayed to know if either control needs adjusting. -- Daryl S "javablood" wrote: I have a combo box (cbo2) and a list box (lbo1) that are filtered depending on the selection in a third combo box (cbo1). The boxes are filtering correctly but there is a problem and a question: Problem - cbo2 does not allow me to make a selection even though I can see the options. Question - I want the user to be able to select either something in cbo2 or lbo1. How do I accomplish this? thank you, -- javablood |
Thread Tools | |
Display Modes | |
|
|