Results 1 to 6 of 6

Thread: subform issue

  1. #1
    Join Date
    Apr 2004
    Posts
    7

    Unanswered: subform issue

    This is difficult to explain...
    I have a form that contains a subform. The problem is, in the table the records are separated, some from the main form and some from the subform. How can I get access to show the correlation of the two forms in the table?

    ras

  2. #2
    Join Date
    Feb 2004
    Posts
    126
    Would you pleas provide a few more details?

    What entities are being displayed on each of the forms?
    What information is in the table?

    Are you just looking for how to link the parent form with the child form?

    Let us know and we will help you.

  3. #3
    Join Date
    Apr 2004
    Posts
    7

    more details...

    In the main form, there are 3 controls. There is a drop-down list where an employee can select their name. The department is automated, and there's a combo box that lists projects that are associated with the department. In the subform, there is a combo list (set to continuous form mode) that shows a list of tasks associated to the projects. And finally, a text box to enter the qty of hours.

    I have tables built for employees, departments, projects and tasks and all of the id's to establish their relationships. The ouput of the form points to a master table. The main form data gets put on one line and the tasks from the subform get put on another.

    Does this help?
    Last edited by ras1; 04-28-04 at 18:15.

  4. #4
    Join Date
    Feb 2004
    Posts
    126
    I apologize, but I am still confused.

    What exactly are you asking? Do you have a problem with the form or the table? What data is in the "master table"?

  5. #5
    Join Date
    Apr 2004
    Posts
    7
    An example: From the form, I input Bill (employee) from Drafting (dept) and selected estimates (Project). This is all part of the main form.

    Then, in the subform, selected 3 tasks and the hours.

    What I would hope to see in the "Master table as a result is:

    Employee Dept Project Task Hrs

    Bill Drafting Estimates email 2
    Bill Drafting Estimates meetings 2
    Bill Drafting Estimates reports 2

    What I'm getting is this:

    Employee Dept Project Task Hrs

    Bill Drafting Estimates ------------ this comes from the main form
    Drafting Estimates email 2 ---- this all
    Drafting Estimates meetings 2 ---- comes from the subform
    Drafting Estimates reports 2 ----

  6. #6
    Join Date
    Apr 2004
    Location
    Sydney Australia
    Posts
    369
    Like grrr223 I am having trouble understanding your situation but appears that data "Bill" you selected on your main Form is not in the sub form.

    If that is the situation then what I do is this:

    I make a rough form (no one is going to see it) that has the fields from the table that supports your sub form. You can just make a copy of the sub form.

    You make a maco that opens this rough form where the record will match the record on your main form. You also include in the macro a SetValue action where

    Item [Forms]![RoughForm]![Field Where Bills name goes]

    Expression [Forms]![MainForm]![Field Where Bills name goes]

    Then the macro has a Close Form action.

    Then the macro gas a GoTo action that is next (next record) and then previous. This will make the sub form show the changes.

    The macro can be run fro afterupdate on the combo box.

    If you have Echo No at the start of the macro actions you will just see the data change in the sub form.

    Mike

Posting Permissions

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