Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2005

    Unanswered: Access Tables/Form Help for Newbie


    I am making a form via Microsoft Access 2003 and need help with setting it up. I am a PHP programmer and am VERY new to Access programming.

    I have a form called Audits, and 2 tables. One called Employees and One called departments.

    The table employees has 3 columns (id, name, departmentid), the department table has 2 columns (id, departmentname).

    In my Audits form I have an option where you must select which department. The list of department names are dynamically generated from the table departments.

    The next thing I have in the form is a employee list. I want to set it up so that when you select a department it shows all the employee in that department and only that department. Can someone help?

  2. #2
    Join Date
    Nov 2004
    out on a limb
    Provided Answers: 59
    Hi jmweb
    and welcome to the forum....

    There is a differnet design stylistic between web and more conventional programming.

    Access uses the concept of subforms to handle the sort of problem you outlining.

    Intially design your employee subform contianing all the controls / columns as required.

    Then design you parent form for audits.
    add a combo or list box containing the list of departmetns - there is a wizard that will help you through the process of creating the wizard.

    Then you need to insert the sub report specifying that the link criteria is the department ID. IE the department ID on the combo box should match the departmentID in the sub form.

    I'd suggest you have a try and see ho far you get, and come back if Access defeats you.


  3. #3
    Join Date
    Nov 2005
    Got most of the db created as well as the form however I am getting stuck at it automatically knowing the ID as the only thing being displayed is the Department name. Therefore I need to find some way for it to find out the ID and then populate it into other areas from there.

  4. #4
    Join Date
    Mar 2003
    The Bottom of The Barrel
    Provided Answers: 1
    What kind of control are you using to select the department? If it's a combo or list box, you can use column count and column widths to display or hide certain data.

    ie: A combo box with department_id and department name could be made to display only the department name, but have the department id as its true value by setting columncount = 2, and columnwidths = 0";1" (also make sure column 1 is your "bound column", that's the one that gets looked at when you cal cboMyCombo.value)
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

Posting Permissions

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