Problem with a Subform

R

radink

Hey all,

I'm somewhat new to Access, so here goes.

I've created a fairly simple DB that will track our time with different
projects. For entry, I created a form, with a subform in it.

I'll create a new record and fill out the info. Then If I click the new
record button (for the main form, not the subform) and I fill it out,
and then go back to the previous record, it has inserted a new blank
line in the beginning of the subform.

Any idea why this is occurring?

Thanks!
 
R

Ruel via AccessMonster.com

First some things to know about creating tables and relationship and how they
will behave in the main form and subform.

Rule 1. Make sure your main table which will be bound to the main form
has a primary key and is autonumbered.

Rule 2. Make sure your related table which will be bound to the subform
has the primary key field from the main table and is indexed
with
the follow setting:

Indexed = Yes (Duplicates OK)

Rule 3. Save both tables and create a one-to-many relationship between them
using the Relationships button on the toolbar. Here you can
Enforce
Referentical Integrity, Cascading Updates and Deletes.

Rule 4. With the above things set in place. Create a new Main form and
create
a new Subform. The Link Child and Link Master Fields between
the Main
Form and Subform will Transfer the primary key from the main
table to
the related table when adding records.




Ruel




I think the subform is related to the main form.
Is the main form table related to subform table?
[quoted text clipped - 16 lines]
 
R

radink

Ruel,

Thanks for the help! The biggest mistake I made was not having a
separate table for the subform. When I created that, It really helped.
I'm still a little fuzzy on the relationship thing, but I'll try to
figure it out. It seemed to be working ok without having to use the
relationship part though.

Mark

First some things to know about creating tables and relationship and how they
will behave in the main form and subform.

Rule 1. Make sure your main table which will be bound to the main form
has a primary key and is autonumbered.

Rule 2. Make sure your related table which will be bound to the subform
has the primary key field from the main table and is indexed
with
the follow setting:

Indexed = Yes (Duplicates OK)

Rule 3. Save both tables and create a one-to-many relationship between them
using the Relationships button on the toolbar. Here you can
Enforce
Referentical Integrity, Cascading Updates and Deletes.

Rule 4. With the above things set in place. Create a new Main form and
create
a new Subform. The Link Child and Link Master Fields between
the Main
Form and Subform will Transfer the primary key from the main
table to
the related table when adding records.

Ruel
I think the subform is related to the main form.
http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200612/1
 
Top