Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Linked Forms

Discussion in 'Information Technology' started by Sarah_Lecturer, Jul 28, 2006.

Tags:
  1. Sarah_Lecturer

    Sarah_Lecturer
    Expand Collapse
    Guest

    I have a database containing two tables which are related through the Staff
    ID number.

    The first table Staff information is related with a 1:* relationship to the
    bookings table.

    I.e. one member of staff can book many courses.

    I have created the forms based on these tables using the wizard provided in
    Access 2003. Mid-way through the Wizard I used the option to LINK the forms.

    When you open the Staff Information form you have a button which says
    "Bookings". When you access the bookings form you are provided with a
    listing of the courses the staff have booked onto.

    My problem is that if I add any records to this bookings table they are
    added; but to an incorrect staff record i.e. not the filtered record from the
    staff Information table. How do I get added bookings to 1) Be retained 2) Be
    retained within the filtered record already selected?

    Please HELP!

    Thanks for reading and sorry if this all seems a bit vague - not great with
    terminology x
     
  2. Loading...

    Similar Threads Forum Date
    Opinion Letter: When terrorism is falsely linked by race or religion, we all become the victims Breaking News Apr 27, 2013
    SciTech Law of Entropy Linked to Evolution of Intelligence Breaking News Apr 23, 2013
    Canada GM corn linked to early death in new study Breaking News Sep 22, 2012
    India set to ban 100 Al Qaeda-linked groups Hard Talk May 17, 2010
    Sikh News Temple linked to terrorists still active (Moldova.org) Breaking News Feb 5, 2008

  3. Arvin Meyer [MVP]

    Arvin Meyer [MVP]
    Expand Collapse
    Guest

    Check the Link Master/Link Child property of the subform to make sure it is
    properly connected.
    --
    Arvin Meyer, MCP, MVP
    Microsoft Access
    Free Access downloads
    http://www.datastrat.com
    http://www.mvps.org/access

    "Sarah_Lecturer" <SarahLecturer@discussions.microsoft.com> wrote in message
    news:A36989C1-B7E4-4267-B609-8876C1E5DCA0@microsoft.com...
    > I have a database containing two tables which are related through the

    Staff
    > ID number.
    >
    > The first table Staff information is related with a 1:* relationship to

    the
    > bookings table.
    >
    > I.e. one member of staff can book many courses.
    >
    > I have created the forms based on these tables using the wizard provided

    in
    > Access 2003. Mid-way through the Wizard I used the option to LINK the

    forms.
    >
    > When you open the Staff Information form you have a button which says
    > "Bookings". When you access the bookings form you are provided with a
    > listing of the courses the staff have booked onto.
    >
    > My problem is that if I add any records to this bookings table they are
    > added; but to an incorrect staff record i.e. not the filtered record from

    the
    > staff Information table. How do I get added bookings to 1) Be retained 2)

    Be
    > retained within the filtered record already selected?
    >
    > Please HELP!
    >
    > Thanks for reading and sorry if this all seems a bit vague - not great

    with
    > terminology x
     
  4. Rick Brandt

    Rick Brandt
    Expand Collapse
    Guest

    "Sarah_Lecturer" <SarahLecturer@discussions.microsoft.com> wrote in message
    news:A36989C1-B7E4-4267-B609-8876C1E5DCA0@microsoft.com...
    >I have a database containing two tables which are related through the Staff
    > ID number.
    >
    > The first table Staff information is related with a 1:* relationship to the
    > bookings table.
    >
    > I.e. one member of staff can book many courses.
    >
    > I have created the forms based on these tables using the wizard provided in
    > Access 2003. Mid-way through the Wizard I used the option to LINK the forms.
    >
    > When you open the Staff Information form you have a button which says
    > "Bookings". When you access the bookings form you are provided with a
    > listing of the courses the staff have booked onto.
    >
    > My problem is that if I add any records to this bookings table they are
    > added; but to an incorrect staff record i.e. not the filtered record from the
    > staff Information table. How do I get added bookings to 1) Be retained 2) Be
    > retained within the filtered record already selected?
    >
    > Please HELP!
    >
    > Thanks for reading and sorry if this all seems a bit vague - not great with
    > terminology x


    The wizard is using incorrect terminology. Forms are only "linked" when one
    form is a subform embedded inside of another. Your present bookings form is
    nothing more than a form opened with a filter applied. This will do nothing to
    control NEW records. All it does is filter for a desired set of existing ones.

    If the only time your bookings form is opened is when the Staff form is also
    open then you can set the DefaultValue property for the controls on the second
    form to references that exist on the first form.

    =Forms!Staff!ControlName

    Personally if I want the behavior that is produced by a subform then I use a
    subform. Even if real estate is tight on your staff form you could add a
    TabControl and have the staff controls on one page a bookings subform on the
    second page. Then all of this is automatically done by setting the appropriate
    field names into the MasterLink and ChildLink properties of the subform control.

    --
    Rick Brandt, Microsoft Access MVP
    Email (as appropriate) to...
    RBrandt at Hunter dot com
     

Share This Page