Form info is going into two rows in the table producing duplicates

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I have a form which has a subform in it. When it is filled in in total i
get an error message saying you cant do this coz it will produce duplicate
info and cant have duplicates because of the primary key. When i leave the
subform blank the rest of the info goes in fine. For some reason the info in
the subform goes to the next row in the table but uses the same custID which
cannot be duplicated. Does anyone know how i can correct this.

Natasha
 
It appears you have both a main Form and a Form embedded in a Subform
Control both using the same RecordSource (or at least, Record Sources that
have the same underlying Table). That usually is indicative of improper
database design. If you could clarify with some detail about what you have,
what you are doing, and what you are trying to accomplish, perhaps someone
could be of more assistance.

Larry Linson
Microsoft Access MVP
 
I have a service history form showing company Name, Address, ect service
date, Installation date, Technician and service details. Each company will
have a number of coolers so this information is in the sub form serial
number, model name, location and connection. The subform was created using
the wizard coming from a query. All the data is linked to the same table.

Natasha
 
Almost certainly, you should have two tables, one with information about the
Company; another, related table about the coolers that company has (which
would be what you want to display in the Subform). From your description,
I'd guess you have multiple fields for cooler information right in the
Company table?

Larry Linson
Microsoft Access MVP
 
Back
Top