A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

combo box selection



 
 
Thread Tools Display Modes
  #1  
Old November 17th, 2009, 05:23 PM posted to microsoft.public.access.forms
javablood
external usenet poster
 
Posts: 84
Default 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  
Old November 19th, 2009, 02:42 PM posted to microsoft.public.access.forms
Daryl S[_2_]
external usenet poster
 
Posts: 881
Default 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  
Old November 20th, 2009, 02:58 PM posted to microsoft.public.access.forms
javablood
external usenet poster
 
Posts: 84
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:44 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.