Link to home
Start Free TrialLog in
Avatar of Sarah_Avalon
Sarah_Avalon

asked on

blank child field in subform

Hi,  I have a subform within a form, I have the master/child fields setup but the child field always shows empty.  New records work, (the child field appears when adding a record) the new records show up in the table.  But when I try to view the existing records, no records appear.  I have the relationship defined as one to many with referential integrety 'on'.  Can you help me figure this out please?  I'm tryed everything I can think of and then some.
Avatar of thenelson
thenelson

What are the tables, fields and the type of fieldsfor the master and child?
If your intended child field is an unbound control, it won't appear on the list...you have to type it in so that Access will know it is the intended child link.
Avatar of Sarah_Avalon

ASKER

The tables involved are:
(parent) ProcessUnit - has field processPK
(child) Layer - has foregin key fields LprocessPK and LmaterialPK
(child of child) Material - has field materialPK

I have the following setup:
I have text boxs in Layer bound to materialPK and processPK
In PorcessUnit form I have the master link field set to processPK and child link field set to LprocessPK

As I said above; I have the relationships defined as one to many with referential integrety 'on'.  I've tried every possible config with no luck.

What's so wierd is that records are added sucessfully from subForm Layer, just don't show up when I try to view all records.

Thanks so much for your help!
ASKER CERTIFIED SOLUTION
Avatar of puppydogbuddy
puppydogbuddy

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi agian,  Now that you mention it, I tested the subform (Layer) and I get the same behavior; I can add to the table but it won't show me the records in the table, (except those I've just added in that session).  It's as if the recordset is empty when the form opens.  This is killing me, I know how to do this but in this case it won't work.  I have the form set as follows:

Oh my &%*&^!!!! I just figured it out!  I don't get this though....  I changed the form setting to Data Entry = NO. I've noticed that in all my other forms that's what it says and if I ever changed it things didn't work. So I've always left it at NO, don't know how or why it was set to YES this time.  But this has never made sence to me; shouldn't Data Entry be set to YES if you want to input data??? Gezzzz!  Thanks!

Data entry means enter data NOT edit data, so data entry = Yes means this form is entering new data not editing existing data.  It will only give you a blank (new) record to enter data into.
Sarah,
Thanks for the points.  I was just going to explain to you why data entry= Yes was the cause of your problem, but I see that thenelson has already given you the answer.  The important thing is that you got your problem solved.
Thanks thenelson and thanks puppydogbuddy!!!  You guys are awsome.

Sarah