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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subform not displaying data 1

Status
Not open for further replies.

Roblin

Technical User
Feb 3, 2005
26
US
I have a form (frmEntry) that inputs data to a table (tblRob). On the same form (frmEntry) there is a subform (tblRob_subform) that should display the data in that table (tblRob), but it doesn't. There is another subform (tblProjects_subform) on the same form (frmEntry) that displays data from a different table (tblProjects), but the data for that table (tblProjects) is not entered via the form (frmEntry) that contains the subforms. tblProject_subform displays all the records. tblRob_subform only displays the headers. When I open the subform by itself in datasheet view, all of the records are there. They just don't appear on the entry form. Does anyone know why this could be? Thank you.
 
Are the LinkMasterFields and LinkChildFields properties properly assigned ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Well that's twice you saved me today! I really appreciate it.
 
Hint: If you create your relationships BEFORE creating your form and subform, Access will automatically create Master / Child link fields.

To do this, open up the Relationships GUI screen ("Tools" -> "Relationships") Add your tables. Example tblRob, tblProject. (What is frmEntry based on? You state tblRob but then reference tblRob is used for a subform???)

Then click on the primary key in one table and drag the key to the appropriate foreign key in the related table. For example, for a Contact database drag tblCompany.CompanyCode (primary key) to tblContact.CompanyCode (foreign key). At the popup window, check-off "Enforce referential integrity".

I am confused about your description...
a) - (frmEntry) that inputs data to a table (tblRob)
b) - (frmEntry) there is a subform (tblRob_subform)
c) - (tblRob_subform) should display the data in that table (tblRob)
d) - (tblProjects_subform) on the same form (frmEntry)

Are you suggesting that the main form is based on tblRob and is used for data entry? And the subform displays other information for tblRob. How do you differentiate and group one tblRob data

This sounds like you may have a potential data sdesign issue. A common approach may be to have two tables such as Invoice and InvoiceDetail. When the Invoice "header" is selected, you can see / enter the Invoice detail records. This is a typical one-to-many relationship.

If I am right about the possible design issue, please review the following...

Fundamentals of Relational Database Design by Paul Litwin
Download document
Read on-line (HTML)


Micro$oft's answer...
Where to find information about designing a database in Microsoft Access
283878 - Description of the database normalization basics
304467 - ACC2000 Defining Relationships Between Tables in a Microsoft Access Database

Richard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top