Results 1 to 7 of 7

Thread: subform

  1. #1
    Join Date
    Aug 2011
    Posts
    7

    Unanswered: subform

    I have two forms. ContactInfo with basic information and a potential employee table / form. The first step is to input the basic information. I then want to click a button to start the potential employee process. I can do this but have run into a slight problem

    I want the new subform to create the new record identifying the information I input into the contactinfo.

    Step 1. input basic information
    step 2. Start new employee process from step 1.

    Is it better to embed the subform in the contact info form or popup a new form.

    Once the process is complete and some "hired" button is clicked, I want a new record to start in the employee table....

    Ok that is good for now

    Thanks again

    Thanks again

  2. #2
    Join Date
    Jan 2009
    Location
    Kerala, India
    Posts
    183
    A Sub-Form embedded in the Basic Info Main Form is ideal for Step-1 & 2. The Sub-form must be Linked on a common information Field (like EmployeeID) using the Link Master Field and Link Child Field properties of the Sub-Fom. This will copy the information automatically in the New Employee record when you start keying in the employee record.

    I didn't get what you are trying to do with the "hired" button, if it is not what you have done in step-2.
    www.MsAccessTips.com (Learn MS-Access Tips & Tricks)
    Learn Advanced MS-Access Programming with sample VBA Code.

    All responses are based on Access 2003/2007

  3. #3
    Join Date
    Aug 2011
    Posts
    7
    In short there are two parts of the process. the first part is the evaluation / interview phase. From there a person will either get hired, not hired, or be in limbo in the evaluation phase for a while.

    If hired, additional information in the hired table would need to be completed, like hire date, and some other personal information.

    I want to lock the evaluation (PotentialHire) record and start a new record in the hired table.

  4. #4
    Join Date
    Aug 2011
    Posts
    7

    Strange behavior

    I have the contactinfoid linked to the potempid field in the child relationship. I created a query so the field instead of displaying a number displays the record lastname, firstname (for easier searching)

    When I create the new record in mainform, it does not link to the subform until i close the main form and reopen it and go to that record. I assume when I create the record in the main form and if the subform is linked properly that new record in the subform should automatically populate the lastname, firstname in the potempid field.

  5. #5
    Join Date
    Jan 2009
    Location
    Kerala, India
    Posts
    183
    You may use an Append Query, to extract required information from both basic table and potential hire table, and add them to the Employee table. Run the Append Query in the "hired" Button-click event procedure (DoCmd.OpenQuery "QueryName",acViewNormal).
    www.MsAccessTips.com (Learn MS-Access Tips & Tricks)
    Learn Advanced MS-Access Programming with sample VBA Code.

    All responses are based on Access 2003/2007

  6. #6
    Join Date
    Jan 2009
    Location
    Kerala, India
    Posts
    183
    When you create a new record on the Main Form the contactinfoid value will get updated on the linked subform field potempid automatically, when you update some other field value on the sub-form.

    Duplicating the main form values like lastname, firstname on the sub-form is not good database design. When you move a record on the main form the current record's related data will appear on the sub-form automatically because of the link between contactinfoid & potempid.
    www.MsAccessTips.com (Learn MS-Access Tips & Tricks)
    Learn Advanced MS-Access Programming with sample VBA Code.

    All responses are based on Access 2003/2007

  7. #7
    Join Date
    Aug 2011
    Posts
    7
    Thanks, I came up with an alternative. I used the ID# and then created a bound text field that displays name just so my wife who is a visual person feels better about seeing the name

Posting Permissions

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