Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2003
    Location
    UK
    Posts
    15

    Unanswered: Forms and Subforms

    Hello,

    I have a main form called 'HW_Equipment' and a subform called 'HW_Software'. these reference HW_EQUIPMENT table and HW_SOFTWARE tables.

    the link is 'HW_Equipment_id' field in both tables.

    HW_EQUIPMENT table:
    --HW_EQUIPMENT_ID--PK
    --NAME
    --DESCRIPTION

    HW_SOFTWARE table:
    --SOFTWARE_ID--PK
    --SOFTWARE_NAME
    --HW_EQUIPMENT_ID--FK
    --DESCRIPTION
    --SYSTEM_REQUIREMENTS
    --OS_PLATFORM

    I would to be able to select a software name on the subform from a drop down box and then from the that selection the rest of the fields on the subform auto populate with the rest of the information in the HW_SOFTWARE table.

    Any pointers would be greatly appreciated.

    Thanks in advance


    Steve

  2. #2
    Join Date
    Apr 2003
    Posts
    42

    Add another table?

    I don't know if I follow your database design, but I am guessing that your HW_EQUIPMENT table is a table to hold information about particular machines and HW_SOFTWARE table is a table to hold information about software and the specs needed to run this software.


    If this is correct. Then it would make more sense to me to structure your tables like this:

    HW_EQUIPMENT table:
    --HW_EQUIPMENT_ID--PK
    --NAME
    --DESCRIPTION

    HW_SOFTWARE table:
    --SOFTWARE_ID--PK
    --SOFTWARE_NAME
    --DESCRIPTION
    --SYSTEM_REQUIREMENTS
    --OS_PLATFORM

    HW_INSTALLED_SOFTWARE table:
    --HW_INSTALLED_SOFTWARE--PK
    --HW_EQUIPMENT_ID
    --SOFTWARE_ID

    By doing this you will solve your forms problem because you can have two separate forms for entering data.

    1. Software data
    and
    2. Machine data

    On your Software form, you can choose your software from a drop-down list and have the correspoding data displayed.

    On your machine form, you can choose your machine from a drop-down list and have a subform based upon the HW_INSTALLED_SOFTWARE AND HW_SOFTWARE tables.

    Therefore you could have both the machine data displayed, plus the software details.

    I hope I am on the right track.

    I would probably try and stay away from using subforms personally, but that's may be just me.

Posting Permissions

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