Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Jun 2012
    Location
    Australia
    Posts
    1
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Access 2010 SwitchBoard - Problem

    HelpDeskNOK.zipdoc_rptObjects.do.doc
    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.

    Thanks,
    SJH.
    Attached DataBase and manual from Documenter.

  2. #2
    Star Lounger tgw7078's Avatar
    Join Date
    Jul 2010
    Location
    Seattle, WA., USA
    Posts
    90
    Thanks
    1
    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

  3. The Following User Says Thank You to tgw7078 For This Useful Post:

    Harrissj (2012-06-12)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •