Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

access dynamic combo boxes

Posted on 2014-11-05
7
Medium Priority
?
244 Views
Last Modified: 2014-11-06
I have a sub report that I first want to select a position and the only show the courses under that position.  I have first setup a query that shows only the positions.  then in the courses I have a query that links the positions to the courses, in that query I have added this criteria [forms]![dbo_emp_course subform]![positionSelect]  but when I select the position I am getting a enter parameter value question.  What am I doing wrong>
0
Comment
Question by:sharris_glascol
  • 3
  • 3
7 Comments
 
LVL 40

Expert Comment

by:PatHartman
ID: 40424725
When you get prompted like this it is because Access can't resolve the reference.  Usually it is a typo but in your case, if I can believe your naming convention, the control you are referencing is on a subform.  To reference a subform, you must include the mainform in the name.
So -
 [forms]![yourmainform]![dbo_emp_course subform]![positionSelect]
or in some cases, you might need -
 [forms]![yourmainform].Form![dbo_emp_course subform]![positionSelect]
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 40424750
you are probably looking for cascading Combo box

and this one cascading combo demo
0
 

Author Comment

by:sharris_glascol
ID: 40424755
I have it so I don't get error message now but it won't let me select an option nor is it updating list
0
Technology Partners: 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!

 
LVL 40

Assisted Solution

by:PatHartman
PatHartman earned 2000 total points
ID: 40424776
I just posted a sample database a few minutes ago.  It includes cascading combos so it may help you.

http://www.experts-exchange.com/Database/MS_Access/Q_28551267.html#a40424709
0
 

Author Comment

by:sharris_glascol
ID: 40424786
Ok I got it to work...  BUT in my sub report it is updating a table so when I start with the first line and select my first combo position and then select my courses it filters correctly.  when I go to do an additional line and select a different position my course on the first line goes away.  is this because of the after update that I have on the positionselect_combo?
0
 
LVL 40

Accepted Solution

by:
PatHartman earned 2000 total points
ID: 40424925
OK.  Cascading combos in a continuous subform are a different problem.  I've attached yet another sample that explains the problem and offers a solution.  Keep in mind that this solution ONLY works for continuous view.  It will not work for DataSheet view since DS view doesn't allow controls to overlay one another.
FixCascadingCombos130128.zip
0
 

Author Comment

by:sharris_glascol
ID: 40427065
Thanks for all the help
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

886 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