Solved

access dynamic combo boxes

Posted on 2014-11-05
7
231 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 34

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 119

Expert Comment

by:Rey Obrero
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
Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

 
LVL 34

Assisted Solution

by:PatHartman
PatHartman earned 500 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 34

Accepted Solution

by:
PatHartman earned 500 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

747 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now