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  

Synchronizing Combo Boxes



 
 
Thread Tools Display Modes
  #1  
Old January 21st, 2010, 06:59 PM posted to microsoft.public.access.forms
denise
external usenet poster
 
Posts: 388
Default Synchronizing Combo Boxes

I need to synchornize two combo boxes

1st combo box contains the "QUESTION NAME"

2nc combo box contains the "CATEGORY"

What is the event procedure or the macro to make this happen?

Thanks.
--
Denise B.
  #2  
Old January 21st, 2010, 07:24 PM posted to microsoft.public.access.forms
Jim Bunton
external usenet poster
 
Posts: 72
Default Synchronizing Combo Boxes

For the first combo the onclick event

set up a query that returns the possible values of Category for the Question
clicked on

me.ComboOne returns this value
so the query is something like

"SELECT CategoryId, CategpoyTxt FROM categorie WHERE question = " &
me.comboOne
then set this as the rowsource for the second Combo

me.comboTwo.Rowsource = sql

then requery the combo

me.ComboTwo.requery

It will thendisplay only the categories you want

[You may can hide the Id's and just show the text by making the id column
zero width

something like comboOne.columnwidths = 0cm; 2.5cm]


"Denise" wrote in message
...
I need to synchornize two combo boxes

1st combo box contains the "QUESTION NAME"

2nc combo box contains the "CATEGORY"

What is the event procedure or the macro to make this happen?

Thanks.
--
Denise B.



  #3  
Old January 21st, 2010, 07:56 PM posted to microsoft.public.access.forms
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Synchronizing Combo Boxes

On Thu, 21 Jan 2010 10:59:01 -0800, Denise
wrote:

I need to synchornize two combo boxes

1st combo box contains the "QUESTION NAME"

2nc combo box contains the "CATEGORY"

What is the event procedure or the macro to make this happen?

Thanks.


What do you mean by "synchronization"? What is the relationship between
quetion names and categories? It might help to post the SQL view of the
Rowsource queries of both combos, or (if they're based on a table) the
relevant table fields.
--

John W. Vinson [MVP]
  #4  
Old January 21st, 2010, 07:57 PM posted to microsoft.public.access.forms
Golfinray
external usenet poster
 
Posts: 1,597
Default Synchronizing Combo Boxes

See Allen Brownes explanation of cascading combo boxes at www.allenbrowne.com
--
Milton Purdy
ACCESS
State of Arkansas


"Denise" wrote:

I need to synchornize two combo boxes

1st combo box contains the "QUESTION NAME"

2nc combo box contains the "CATEGORY"

What is the event procedure or the macro to make this happen?

Thanks.
--
Denise B.

 




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 04:36 PM.


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