Data entry creating duplicate rows in table

M

Michael F

I have a large form "JobTrack" that has a record source of the table "Job
Information"
I also have a subform "Tapered-Misc Form" on that large form that also has
the record source "Job Information"

The subform links as follows: Show Job Information for each record in Job
Information using ID

the subforms Data properties read as follows

Source Object : Tapered-Misc Form
Link Master Fields : ID
Link Child Fields: ID
Filter On Empty Master : No
Enabled : Yes
Locked : No

When I switch from the main form to the subform and enter data, a duplicate
record is created. I get the following warning...

The changes you requested to the table were not successful because they
would create duplicate values in the index, primary key, or relationship.
Change the data in the field or fields that contain duplicate data, remove
the index, or redefine the index to permit duplicate entries and try again.

Can someone please help to explain why it generates a new record with the
same ID number when entering data on the subforms?

thank you,
Michael
 
S

Steve Schapel

Michael,

It is not normal to have a subform with the same record source as the
parent form. Normally the subform's record source would be a separate
table or query that is related (normally many-to-one) to the main form's
record source. I can't see the specifics of what you are trying to
achieve here, but I think you need to re-think your basic design.
 
M

Michael F

Thank you,
This may be the issue.
I have information to be entered by different groups in the company. Some
of this information is of no interest to others and so is made "invisible" by
making the subform visible.false.
There is far too much information to be displayed on one form so it will
take some creativity, but at least I have a direction now.

I will try and tackle it from another approach and somehow make it so that
the main form is used to enter the data.

thank you,
:)M
 
J

John W. Vinson

There is far too much information to be displayed on one form so it will
take some creativity, but at least I have a direction now.

Two points:

1. If there are so many fields in your table that they can't all be displayed
on one screen, your biggest problem is that your table is not correctly
normalized. Twiddling with form design is not the solution - normalizing your
tables is!

2. If you need to manage screen space, Subforms aren't the appropriate tool;
instead, use a Tab Control. Put some controls on each page of the tab control
so you can view them in the same space on the screen, while having them all
"logically" on the same record on the same form.
 

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