Solved

access dynamic combo boxes

Posted on 2014-11-05
7
235 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 35

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
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 
LVL 35

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 35

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Familiarize people with the process of utilizing SQL Server stored procedures 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 Micr…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

785 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