Saving Continuous Form Only Saves One Record

  • Thread starter Thread starter Roy via AccessMonster.com
  • Start date Start date
R

Roy via AccessMonster.com

I have a subform(continuous) on a main form. I’m using SQL INSERT INTO table
to save the records from the subform to an event table. My problem is that
it is only saving one record when it should save and many records as the
continuous form has.

How do I get the append feature to save multi records from the continuous
form??

Thanks,
Roy
 
Just set the subform's RecordSource to be the event table and bind all the
controls (text boxes?) on the subform to the appropriate fields in that table
(ControlSource of each control). That way, saving is completely automatic;
each record gets saved as the user navigates to the next line.

Assuming that there is a parent/child link between the main & subforms, you
will probably also need to make an invisible text box in the subform's detail
section that holds the value of the linking key and defaults to something
like this:

=[Forms]![yourMainForm]![ControlContainingTheKeyID]

to ensure that the link to the main table is established.
 
Brian, I'm using the subform as a work area for the user. When the user
clicks on the vendor drop-down on the mainform, the subform is populated with
a list of custom packages for that vendor. The user is able to click yes or
no if the package is completed. So, the source is being used for the
vendorPkg list that is reusable over and over again. I was using the INSERT
to try to append the records to the table upon save, but it's only saving one
record (the first one).

Is there another way to save the continuous subform records to my event table?
?

Thanks
Roy
Just set the subform's RecordSource to be the event table and bind all the
controls (text boxes?) on the subform to the appropriate fields in that table
(ControlSource of each control). That way, saving is completely automatic;
each record gets saved as the user navigates to the next line.

Assuming that there is a parent/child link between the main & subforms, you
will probably also need to make an invisible text box in the subform's detail
section that holds the value of the linking key and defaults to something
like this:

=[Forms]![yourMainForm]![ControlContainingTheKeyID]

to ensure that the link to the main table is established.
I have a subform(continuous) on a main form. I’m using SQL INSERT INTO table
to save the records from the subform to an event table. My problem is that
[quoted text clipped - 6 lines]
Thanks,
Roy
 
I can't quite figure out how you have separate records on your subform
without having the form & its controls bound to a table & fields. The aren't
records until they go into a table.

If you are just populating a series of unbound text boxes, then create an
append query (or series of append queries) that gets its info from various
text boxes on the subform, and run the query/queries to append the records.

Roy via AccessMonster.com said:
Brian, I'm using the subform as a work area for the user. When the user
clicks on the vendor drop-down on the mainform, the subform is populated with
a list of custom packages for that vendor. The user is able to click yes or
no if the package is completed. So, the source is being used for the
vendorPkg list that is reusable over and over again. I was using the INSERT
to try to append the records to the table upon save, but it's only saving one
record (the first one).

Is there another way to save the continuous subform records to my event table?
?

Thanks
Roy
Just set the subform's RecordSource to be the event table and bind all the
controls (text boxes?) on the subform to the appropriate fields in that table
(ControlSource of each control). That way, saving is completely automatic;
each record gets saved as the user navigates to the next line.

Assuming that there is a parent/child link between the main & subforms, you
will probably also need to make an invisible text box in the subform's detail
section that holds the value of the linking key and defaults to something
like this:

=[Forms]![yourMainForm]![ControlContainingTheKeyID]

to ensure that the link to the main table is established.
I have a subform(continuous) on a main form. I’m using SQL INSERT INTO table
to save the records from the subform to an event table. My problem is that
[quoted text clipped - 6 lines]
Thanks,
Roy
 
Back
Top