Solved

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

Posted on 2009-03-29
7
637 Views
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!
0
Comment
Question by:accessck
  • 4
  • 2
7 Comments
 
LVL 13

Expert Comment

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

Author Comment

by:accessck
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.


EE-QandA-Tracking.mdb
0
 
LVL 13

Expert Comment

by:ioane
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.


EE-QandA-Tracking.mdb
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 

Author Comment

by:accessck
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.
0
 
LVL 13

Expert Comment

by:ioane
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.
0
 
LVL 44

Accepted Solution

by:
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).
0
 
LVL 13

Assisted Solution

by:ioane
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:
EE-QandA-Tracking.mdb
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Suggested Solutions

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
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 functions 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 Ac…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…

810 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