D
Delano
I am using Access 2000. I have a subform within a form. The subform is
setup as a continuous form. The form and subform allows me to bring up an
employees inventory record(s). I added two additional ‘unbound’ fields to
the continuous subform. This was done for the purpose of adding additional
information to the record(s) and then later saving all the subform records to
another table. My problem\question is two fold.
First, the problem that I am having is if an employee that I query has
multiple records in the subform and I put the information that’s needed in
the ‘unbound’ field the info. repeats over and over throughout the other
unbound fields (column) in the subform. I need to stop this from happening
of course because each record in the subform needs to be able to hold
different information.
Secondly, I would like the user to be able to press a command button and
have all the information in the subform (all records) and unbound fields be
appended to another existing table. First, I don’t know if it is possible to
do this with a subform and if so, I don’t know how to address the subform in
the code properly. I have used the below code to append directly from a form
into a table before and it has worked OK:
Private Sub Command33_Click()
DoCmd.RunSQL "insert into EMPONTBL (ID, LAST, FIRST, GROUP, CATEGORY,
DESCRIPTION) values (forms!ENTFRM!ID, forms!ENTFRM!LAST, forms!ENTFRM!FIRST,
forms!ENTFRM!GROUP, forms!ENTFRM!CATEGORY,
forms!ENTFRM!DESCRIPTION)"
End Sub
Any ideas or suggestions on how I could modify this code to work with a
subform that has multiple records and to stop the information from repeating
in the unbound fields of the subform will be greatly appreciated.
Thanks in advance.
setup as a continuous form. The form and subform allows me to bring up an
employees inventory record(s). I added two additional ‘unbound’ fields to
the continuous subform. This was done for the purpose of adding additional
information to the record(s) and then later saving all the subform records to
another table. My problem\question is two fold.
First, the problem that I am having is if an employee that I query has
multiple records in the subform and I put the information that’s needed in
the ‘unbound’ field the info. repeats over and over throughout the other
unbound fields (column) in the subform. I need to stop this from happening
of course because each record in the subform needs to be able to hold
different information.
Secondly, I would like the user to be able to press a command button and
have all the information in the subform (all records) and unbound fields be
appended to another existing table. First, I don’t know if it is possible to
do this with a subform and if so, I don’t know how to address the subform in
the code properly. I have used the below code to append directly from a form
into a table before and it has worked OK:
Private Sub Command33_Click()
DoCmd.RunSQL "insert into EMPONTBL (ID, LAST, FIRST, GROUP, CATEGORY,
DESCRIPTION) values (forms!ENTFRM!ID, forms!ENTFRM!LAST, forms!ENTFRM!FIRST,
forms!ENTFRM!GROUP, forms!ENTFRM!CATEGORY,
forms!ENTFRM!DESCRIPTION)"
End Sub
Any ideas or suggestions on how I could modify this code to work with a
subform that has multiple records and to stop the information from repeating
in the unbound fields of the subform will be greatly appreciated.
Thanks in advance.