Access 2003 - Need help with synchronized combo boxes in subform with continuous view

Posted on 2009-03-29
Last Modified: 2013-11-28
My Database: I have a simple database with two tables, Questions and Correspondence, that are in a many-to-many relationship.  Each Question is assigned a unique CategoryID

Form: I have a Correspondence Form that includes a subform for each Corresp_ID displaying all the Questions asked by that Corresp_ID.  When the user enters new Corresp_ID records in this form, they can also enter the questions asked by this new Corresp_ID in the subform using the cboQuestion combo box.  

My Question: I would like to modify this subform to allow the user to select a Category in a new cboCategory combo box.  This combo box will be synchronized to the Question combo box, so that once a Category is selected, only those questions assigned will appear in the Question combo box.

Also, I would like the subform to be in continuous form view, so that the user can easily see all the questions asked by a particular Corresp_ID.  I am having problems with this.  Once I go to another record in the subform, the Question combo box in other records either blanks out, or all the records change to the combo box selections made.  

I would really really appreciate your expert advice. I have been hitting the wall on this one for quite some time now.

Thanks in advance!
Question by:accessck
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
LVL 13

Expert Comment

ID: 24015170
Can you post a jpg of your form(s) please?

Author Comment

ID: 24015215
Hello Tramtrak, Thanks for your reply. I'm not sure how to make my form into a .jpg, so if it's okay with you I will post a sample .mdb file. The form I'm trying to revise is [frm Correspondence].  Thank you again for any expert advice you can provide.

LVL 13

Expert Comment

ID: 24015360
Hi accessck,

Your combo box should go on your main form.

After that, it should be fairly straight forward.
You need to add an event catcher to your main form to deal with filtering selections made by the user (I have used the OnLostFocus event).
There is an if statement here that will deal with an empty combo box meaning all categories will show.

Example uploaded, hope this helps.

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)


Author Comment

ID: 24015614
Hi Tramtrak,
Thanks for your response. I'm not sure I clearly communicated my question.  (Please bear with meIm an Access beginner.)

It seems like what you suggested will filter the results of the subform by the Category combo box selection.  (But I did not see a Category combo box on the main form in the file you uploaded.)

I am actually trying to synchronize the Category and Questions combo boxes.  I'd like the Category combo box selection to narrow down the Question combo box selection.  Then I want the user to be able to select questions from the Question combo box to populate the subform records.  Does the filter property do that?  I had been trying to use AfterUpdate in the Category combo box.  

Please let me know if my question does not make sense.  I dont think the filter property will accomplish what I need, because I am dealing with 2 combo boxes and a subform in continuous view.

Thanks for any additional advice you can provide.
LVL 13

Expert Comment

ID: 24015635
Hi accessck,

The combo box should be on the main form on the right hand side (under contact method).

You are correct however, this will simply filter all records to only show those with the selected category.

I will have another look at it and get back to you.
LVL 44

Accepted Solution

Leigh Purvis earned 400 total points
ID: 24015681
I dare say that the scenario you intend is as in the example found in the page (linked to in my profile) called "List Select" which offers, among other things, the "Row Varying Combo" demo.
Nothing new or clever, just standard stuff of overlaying controls.  (But there is more than one way to implement that same functionality - for example including the value in the query to which the form is bound or using a function call such as a DLookup etc).
LVL 13

Assisted Solution

ioane earned 100 total points
ID: 24015801
Hi accessck,

Still not sure if I'm on the right track here but have a look at the example and let me know how close I am

Uses an unbound combo-box and bound text box:

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question