Subform appears for new records only

J

JK

Background:

I have a Grant database with a form (frmGrantData) that has a control
source based on a table "tblGrantData" with the primary key
"GrantNumber"

In this form, I have two subforms (sbfrmProjectDocuments and
sbfrmGrantLocations) - both are based on related tables that have the
foreign key "GrantNumber." Both subforms are linked (Master/Child) by
"GrantNumber" as well.

When I add a new record using the form, everything works correctly with
the subforms appear allowing me to add new Project Documents or Grant
Location information to the Grant.

The problem is when I open an existing Grant, the subforms do not
display any existing data, or provide a field to enter new data. They
do display the labels that appear in the subform's Form Header, but
nothing in the Detail section is displayed. I've looked at all the
enabled/locked controls for the subform and all the elements, and
everything looks fine.

Any suggestions on what else to look for?

Thanks!
JK
 
R

ruralguy via AccessMonster.com

It sure sounds like the LinkChild/MasterFields properties are not set up
correctly.
Thank you for the suggestion, but on both subforms, data entry was
already set to No.
Open you subform in design view and ensure that data entry is set to No
[quoted text clipped - 30 lines]
 
J

JK

Let me correct my original post. When a Grant record has Locations or
Documents entered, that data *DOES* appear in the subforms after it is
opened at a later time. The problem is that the new field row does not
appear to add a new Location or Document.

In other words, the subforms are showing current data, but will not
allow me to add new data.

Note that "Allow Additions" is turned on for the partent form as well
as both subforms.

Thanks,
JK


It sure sounds like the LinkChild/MasterFields properties are not set up
correctly.
Thank you for the suggestion, but on both subforms, data entry was
already set to No.
Open you subform in design view and ensure that data entry is set to No
[quoted text clipped - 30 lines]
Thanks!
JK
 
R

ruralguy via AccessMonster.com

That sounds more like your SubForms are based on *non* updateable queries.
Is that possible?
Let me correct my original post. When a Grant record has Locations or
Documents entered, that data *DOES* appear in the subforms after it is
opened at a later time. The problem is that the new field row does not
appear to add a new Location or Document.

In other words, the subforms are showing current data, but will not
allow me to add new data.

Note that "Allow Additions" is turned on for the partent form as well
as both subforms.

Thanks,
JK
It sure sounds like the LinkChild/MasterFields properties are not set up
correctly.
[quoted text clipped - 13 lines]
 
R

ruralguy via AccessMonster.com

Or maybe Allow Additions is set to NO?
Let me correct my original post. When a Grant record has Locations or
Documents entered, that data *DOES* appear in the subforms after it is
opened at a later time. The problem is that the new field row does not
appear to add a new Location or Document.

In other words, the subforms are showing current data, but will not
allow me to add new data.

Note that "Allow Additions" is turned on for the partent form as well
as both subforms.

Thanks,
JK
It sure sounds like the LinkChild/MasterFields properties are not set up
correctly.
[quoted text clipped - 13 lines]
 
J

JK

no, they are based on tables. I just figured out the problem!
(although i still don't know what caused it)

I looked at the properties while the form was running, and noticed that
Allow Edit/Additions/Deletions somehow got turned off when the form was
opened. So, I put code in the OnOpen event that turned them back on:

[frmGrantLocations].Form.AllowEdits = True
[frmGrantLocations].Form.AllowAdditions = True
[frmGrantLocations].Form.AllowDeletions = True

Thanks for your time though - I hope this post helps someone in the
future.

JK


That sounds more like your SubForms are based on *non* updateable queries.
Is that possible?
Let me correct my original post. When a Grant record has Locations or
Documents entered, that data *DOES* appear in the subforms after it is
opened at a later time. The problem is that the new field row does not
appear to add a new Location or Document.

In other words, the subforms are showing current data, but will not
allow me to add new data.

Note that "Allow Additions" is turned on for the partent form as well
as both subforms.

Thanks,
JK
It sure sounds like the LinkChild/MasterFields properties are not set up
correctly.
[quoted text clipped - 13 lines]

--
HTH - RuralGuy (RG for short) acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via AccessMonster.com
 
R

RuralGuy

Glad you got it sorted. Thanks for posting back.

no, they are based on tables. I just figured out the problem!
(although i still don't know what caused it)

I looked at the properties while the form was running, and noticed that
Allow Edit/Additions/Deletions somehow got turned off when the form was
opened. So, I put code in the OnOpen event that turned them back on:

[frmGrantLocations].Form.AllowEdits = True
[frmGrantLocations].Form.AllowAdditions = True
[frmGrantLocations].Form.AllowDeletions = True

Thanks for your time though - I hope this post helps someone in the
future.

JK


That sounds more like your SubForms are based on *non* updateable queries.
Is that possible?
Let me correct my original post. When a Grant record has Locations or
Documents entered, that data *DOES* appear in the subforms after it is
opened at a later time. The problem is that the new field row does not
appear to add a new Location or Document.

In other words, the subforms are showing current data, but will not
allow me to add new data.

Note that "Allow Additions" is turned on for the partent form as well
as both subforms.

Thanks,
JK

It sure sounds like the LinkChild/MasterFields properties are not set up
correctly.
[quoted text clipped - 13 lines]

--
HTH - RuralGuy (RG for short) acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via AccessMonster.com
_______________________________________________
hth - RuralGuy (RG for short)
Please post to the NewsGroup so all may benefit.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top