Solved

access dynamic combo boxes

Posted on 2014-11-05
7
236 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 36

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
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
LVL 36

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 36

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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Suggested Solutions

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

820 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