Subform creates a blank record

G

Guest

I have a 2-level subform that creates an unwanted blank subform. When I go
to my form I can see the Master data and the higher level subform correctly
but the 2nd level (lowest) subform shows a blank form. If I advance to the
next record and then go back to my 1st record , all forms are correct and
show the correct data. My forms are all linked by the same field [MarinaID].
My top form calls the subform1 on that field and the subform1 calls
subform2 but subform2 is initally blank until I advance a record and then
return to my original selection. This really screws up printing the form
correctly although once corrected the print job is correct. Any ideas?
 
S

strive4peace

what are

LinkMasterFields
LinkChildFields

for each subform?


Warm Regards,
Crystal
*
:) have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*
 
S

strive4peace

Hi dapetrella ,

"I think that I have found some of the problem...my NUM is an AutoNumber
field and then I copied NUM to IDMARINA in my tblMarinas but I can't get
it to automatically update the IDMARINA when a new record is created so
I have to manually update."

If NUM is an autonumber field in the table for the main form, then I
assume it is defined in the table for the subform (tblMarinas) as:

NUM, LongIteger, DefaultValue --> Null

make sure that NUM is ON your subform and that is also the control name
(its visible property can be set to No -- it doesn't have to show, but
it does have to be there)

When new records are created, NUM in the subform will take on the same
value as NUM on the main form

tblMarinas should also have an Autonumber field, IDMarina or, as I like
to do it, MarinaID (I like ID to be at the end, for some reason)

Is the second subform nested onto the first or is a subform from the
main form? You can do it either way -- I like to keep everything on the
main form -- usually easier to lay out.


Warm Regards,
Crystal
*
:) have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*


Form #1: Child - Num;IDMarina
Master- Num;IDMarina

Form #2: Child - IDMarina
Master- IDMarina

I think that I have found some of the problem...my NUM is an AutoNumber
field and then I copied NUM to IDMARINA in my tblMarinas but I can't get it
to automatically update the IDMARINA when a new record is created so I have
to manually update.

My sense is that because there is no entry in the newly created record for
field IDMARINA, the subform has no record source and there fore doesn't
display. What would you recommend to do to automatically update the IDMARINA
fields? Should I even use the NUM field? Thanks in advance.

strive4peace said:
what are

LinkMasterFields
LinkChildFields

for each subform?


Warm Regards,
Crystal
*
:) have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*


I have a 2-level subform that creates an unwanted blank subform. When I go
to my form I can see the Master data and the higher level subform correctly
but the 2nd level (lowest) subform shows a blank form. If I advance to the
next record and then go back to my 1st record , all forms are correct and
show the correct data. My forms are all linked by the same field [MarinaID].
My top form calls the subform1 on that field and the subform1 calls
subform2 but subform2 is initally blank until I advance a record and then
return to my original selection. This really screws up printing the form
correctly although once corrected the print job is correct. Any ideas?
 

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