combo box selection

J

javablood

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,
 
D

Daryl S

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.
 
J

javablood

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?
 

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