Problem with a Subform

  • Thread starter Thread starter radink
  • Start date Start date
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!
 
Is the main form table related to subform table?

Ruel
 
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]
 
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.
[quoted text clipped - 16 lines]
Thanks!--
Message posted via AccessMonster.comhttp://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200612/1--
Message posted via AccessMonster.comhttp://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200612/1
 

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

Back
Top