Results 1 to 2 of 2
2012-06-10, 20:46 #1
- Join Date
- Jun 2012
- Thanked 0 Times in 0 Posts
Access 2010 SwitchBoard - Problem
I am new to ACCESS. I have made a switchboard from my DataBase. One report works fine. rptOfficerJobs. The other report for departments produces a report without data. Manually the qryDepartmentJobs and rptDepartmentJobs work frmGetDepartment seems to be the trouble. The frmGetOfficers works fine. I cannot see my error. Help.
Attached DataBase and manual from Documenter.
2012-06-12, 08:37 #2
- Join Date
- Jul 2010
- Seattle, WA., USA
- Thanked 12 Times in 12 Posts
Hi SJ -
The combo box named "Department", on form "frmGetDepartment", has the following Row Source:
SELECT [tblDepartments].[DepartmentID], [tblDepartments].[Department] FROM tblDepartments;
So, the numeric DepartmentID is the first column selected, and the text value from Department is the second column selected. The Bound Column for this combo box shows column 1. Thus, the combo box feeds a numeric value to your query criteria, which is based on the text field.
Fixes include one of the following:
1.) Change combo box bound column from 1 to 2 OR (not and)
2.) Remove the first field from the row source of the combo box ---> SELECT Department FROM tblDepartments;
This way, the text column Department will correspond to the bound column 1 OR (not and)
3.) Change the query criteria, so that instead of being on the text field Department, it is on your DepartmentID field.
Fix # 1 is the quickest, but not necessarily the most intuitive, as far as long-term maintenance of your application goes. Six months from now, will you be able to quickly spot that the bound column is 2 instead of 1?Tom Wickerath
Microsoft Access MVP
4/1/2006 - 3/31/2012
The Following User Says Thank You to tgw7078 For This Useful Post: