Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access data entry form's problem

Status
Not open for further replies.

irinnew

Technical User
Mar 19, 2005
81
US
Hi 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,



 
If there are several records for each HospName, shouldn't there be a separate "Hospitals" table, to which the main form should be connected, then a "Records" (or whatever name is appropriate) table with the records in it, to which the subform should be connected, with a "HospID" field to loink them in the Master/Child fields properties?

Have fun! :eek:)

Alex Middleton
 
Is it impossible to use one table? I mean...as long as it works for existing records....
 
It's not impossible but it would either be inappropriate or I am not understanding your schema properly. Do you have a certain number of "Hospitals" each with one or more "Records" related to them? If so, the hierarchy I have mentioned is really desirable for the relationship to be represented and operated via a main form and subform.

Have fun! :eek:)

Alex Middleton
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top