Data Repeated!!!!!

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

Guest

pls help me,

i have a form which require user to input all the user information,
then in the form there is a subform which require the user to input their
required server information

while i have two table also,
one is used for storing user information
and the other is used to store the server information
as one user may require 10 server,
so both server and userinformation have a field which is "staff no"


the case now is that,
when a user Peter require one server(such as sp01) and type the information,
(at this moment i have one record which is peter want sp01 of record no.0001)
then maybe after a few day or a few min later,
Peter want to require one more server,
so he type the information again,
but when he fill the form of Server information,
he just input the server that he is going to have (such as sp02)
then now i have four record ~~
which is
record no 0001 peter want sp01
record no 0001 peter want sp02
record no 0002 peter want sp01
record no 0002 peter want sp02

the record no is a autonumber,
what can i do to prevent the repeated record???
I want the final result is
record no 0001 peter want sp01
record no 0002 peter want sp02
 
If you linked your form-subform by the record no of the main form and thus
your user information table to the record no of the server info form, then
any server information added via the subform will have the same record no, no
matter how many records you add. You don't really need a unique record no
for the server info.
In your example, you had two servers associated with user 0001 and two
servers asscociated with user 0002. Also, you don't need to maintain the
staff no in the server table since that info is linked via that record no.
(Steve is user with record no of 0001 and since you have record no 0001 for
two records in the server table, Steve is linked to them both.)
 
Back
Top