C
Carrie
I have been really struggling with this. I have several
tables:
Main Table: (RecNo is primary key) and includes other info
relative to all forms
Sched1: (Sched1ID is primary key)and includes RecNo
Sched2 etc.
Each form (Schedule 1, Schedule 2...) needs to include
info from the main table and info from Sched1 table. Each
form has 1 to 3 subforms (but they all come frm the same
table)
Master and child links are RecNo
Each form needs to print a copy of the current record as a
report.
I originally set this up so the forms came directly from
the tables but, I was having printing problems. I then
set the forms to come from one query (including the Main
Table and the appropriate Schedule Table) - this solved
the printing problems but, would not properly update the
tables (missing the RecNo) and generating error messages.
So, now I have set up 2 queries (MainQuery and
Sched1Query). Sched1Query is then connected to the
subforms. This is printing fine and when you add a new
record - it updates properly in both tables. My problem
is that when I move from the first subform to the next
subform I get an error message that "The changes will be
unsuccessful because they will create duplicate values in
the index, primary key or relationship".
I am not sure if the problem is my RecNo from the main
table or the ID number in the other table and am leery
about trying to remove them and possibly totally messing
things up. Thanks so much - this newsgroup has helped me
tremendously!
tables:
Main Table: (RecNo is primary key) and includes other info
relative to all forms
Sched1: (Sched1ID is primary key)and includes RecNo
Sched2 etc.
Each form (Schedule 1, Schedule 2...) needs to include
info from the main table and info from Sched1 table. Each
form has 1 to 3 subforms (but they all come frm the same
table)
Master and child links are RecNo
Each form needs to print a copy of the current record as a
report.
I originally set this up so the forms came directly from
the tables but, I was having printing problems. I then
set the forms to come from one query (including the Main
Table and the appropriate Schedule Table) - this solved
the printing problems but, would not properly update the
tables (missing the RecNo) and generating error messages.
So, now I have set up 2 queries (MainQuery and
Sched1Query). Sched1Query is then connected to the
subforms. This is printing fine and when you add a new
record - it updates properly in both tables. My problem
is that when I move from the first subform to the next
subform I get an error message that "The changes will be
unsuccessful because they will create duplicate values in
the index, primary key or relationship".
I am not sure if the problem is my RecNo from the main
table or the ID number in the other table and am leery
about trying to remove them and possibly totally messing
things up. Thanks so much - this newsgroup has helped me
tremendously!