Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2005
    Posts
    13

    Question Unanswered: Access Data Entry Form' s Problem

    Hello Experts!

    In my Access DB, I have a data entry form as the main form which includes
    ‘HospName’ and other information. The ‘HospName’ was selected from a list in
    the main form. I also created a subform linked to the main form by ‘HospName’
    which I want to show all the entered record for the selected ‘HospName’
    whenever the data entry person click the list from the main form. Both main
    form and subform are linked to the same table. When I choose the existing
    record of the form it works fine -- subform gives me all the record for the
    selected ‘hospname’. But when I go to a new record and select a ‘hospName’,
    nothing shows up in the subform. I think it is because the record in Access
    is updated only after you go to next.

    How can I realize my original design?
    Thank you in advance,


    p.s.Hopefully it is not a problem that my form and subform are linked to the
    same table?

  2. #2
    Join Date
    Aug 2002
    Location
    Melbourne, Australia
    Posts
    111
    p.s.Hopefully it is not a problem that my form and subform are linked to the
    same table?
    Reply With Quote

    Sorry, but that is your problem, have a look at subforms in Help.

    You need 2 tables (Main table & Subform Table) with a foreign key in the subform table to link the tables.

    If the help section does not help you then post back, and someone will take you to the next step. Also have a look at the Northwind database.
    Regards,



    John A

  3. #3
    Join Date
    Jul 2004
    Location
    Southampton, UK
    Posts
    368
    Quote Originally Posted by katrin_king
    p.s.Hopefully it is not a problem that my form and subform are linked to the
    same table?
    I think there's a database design problem here. Perhaps you could explain your table(s) i.e. The name of the table and the names of the relevant fields. What is the primary key for your table. Also explain the relationship you are trying to indicate through your form/subform i.e. what "thing" does the form represent, what "thing" does the subform represent. You say you have the form and subform connected to the same table - as ansentry implied, that is not usual.
    Chris

Posting Permissions

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