Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2004
    Location
    Budapest, Hungary
    Posts
    4

    Question Unanswered: Copy data from form to new record in subform

    I am setting up a simple database to track employees. In the parent form the details of a new employee are input. Hire details are put in the subform.

    When a new employee is input into the parent form I would like the subform to automatically add a record with the employee's ID so that the administrator can simply enter the date, position, etc without having to select the new employee's name from a combo list.

    If I set it up as an embedded form, it doesn't recognize the added employee at all. If I set it up as two separate forms, the new employee appears on the list, but they still need to be selected (click on the name).

    Is there any way to make this more user-friendly?

  2. #2
    Join Date
    Nov 2003
    Location
    Europe
    Posts
    369
    In the sub form properties, set the master and child fields to point to the respective fields.

    These are normally an autonumber field of the master that appears also as a foreign key normal number field of the sub form and its underlying table.

    Have you included a field in the second table that is set to store numbers - often indexed but set to accept duplicate values as there could be many records in the sub that relates to the same one id of the master.

    D.

  3. #3
    Join Date
    Mar 2004
    Location
    Budapest, Hungary
    Posts
    4

    Subform not working

    When I set up a subform with the Autonumber-foreign key link it just displays a blank space where the subform should be.

    I haven't worked with Access since 1999, and I'm sure that's how I set it up before. I must be missing something basic.

  4. #4
    Join Date
    Nov 2003
    Location
    Europe
    Posts
    369
    if this is a blank/non-critical db without sensitive data in it, maybe you can post a zipped copy here and I will have a look at it, reposting a "fixed" version later today

    Daniel

  5. #5
    Join Date
    Mar 2004
    Location
    Budapest, Hungary
    Posts
    4
    I have no idea what was wrong, but I scratched it and took the easy way out - the wizard.

    But at least it works now. Thanks for your attention. I'm sure there will be more questions to come...

Posting Permissions

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