Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combo Box Dependent on Another Combo Box

Status
Not open for further replies.

Fish521

Technical User
Nov 3, 2005
29
US
When I set these combo boxes up and exit the design view it is asking for me to enter a parameter value. I went into the query view under the row source and it looks like it gives me the correct information to reference back to the form. Did I input some information wrong here or not. I referenced FAQ 702-4289 when I set these up and they have worked in previously. Here are my row sources and table information

Tables:

tblTeams
Team ID
Team

tblEmployees
Employee ID
Employee
Team


SELECT tblTeams.Team ID, tblTeams.Team FROM tblTeams ORDER BY tblTeams.Team;

SELECT [tblEmployees].EmployeeID, [tblEmployees].Employee, [tblEmployees].TeamID FROM tblEmployees WHERE ((([tblEmployees].TeamID)=Forms!AONObservationsfrm!cboTeam)) ORDER BY [tblEmployees].Employee;

I am somewhat new to Access so if you need any other information please let me know.
 
Hi
Don't know if this is it, but you seen to be missing a set of brackets here:
SELECT tblTeams.[Team ID], tblTeams.Team FROM tblTeams ORDER BY tblTeams.Team;
 
I did that but it still asks for a parameter value, here's the criteria tblEmployees.EmployeeID
 
This implies that there may be a misspelling in EmployeeID. Can you double-check the table?
 
Hi

The spelling in your example for employees table:
Employee ID
The spelling in your SQL string:
EmployeeID

This suggests this is where you should look - can you run the combo query work by itself?

Cheers

Steve
 
I got rid of the parameters portion but now it will not pull up the information in the 2nd combo box Employees. I have gone back through and rekeyed the combo boxes a couple of times but it still doesn't pull up any information
 
Paste your SQL:
[tt]SELECT [tblEmployees].EmployeeID, [tblEmployees].Employee, [tblEmployees].TeamID FROM tblEmployees WHERE ((([tblEmployees].TeamID)=Forms!AONObservationsfrm!cboTeam)) ORDER BY [tblEmployees].Employee;[/tt]
Into the SQL view of query design, open your form and select a team. Open the query you have just created. If it does not show anything, check the form name etc and generally fiddle around until it does. :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top