By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,995 Members | 1,253 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,995 IT Pros & Developers. It's quick & easy.

Unbound form and subform used for new record creation

P: n/a
Good day all,

I am in the process of creating a form used to enter new purchase
orders. The thing is that I do not want to bind the form to a record
set; instead I will use a SQL insert statement in VBA to update the
tables once all the data is entered on the form. I have three fields
(single record) to fill out for the table tblPurchaseOrder and three
fields (multiple records) to fill out for table tblPODetails.

The tblPurchaseOrder info is straight forward to insert with a sql
statement. I have a subform on my form right now that is bound to a
table called TEMP_PO. I do not know how to get the records off of the
subform (TEMP_PO table) and inserted into tblPODetails from my VBA code
when the "create PO" button is clicked on the form.

Thanks for the help.

Tim

Jun 27 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
rkc
tr*****@gmail.com wrote:
Good day all,

I am in the process of creating a form used to enter new purchase
orders. The thing is that I do not want to bind the form to a record
set; instead I will use a SQL insert statement in VBA to update the
tables once all the data is entered on the form. I have three fields
(single record) to fill out for the table tblPurchaseOrder and three
fields (multiple records) to fill out for table tblPODetails.

The tblPurchaseOrder info is straight forward to insert with a sql
statement. I have a subform on my form right now that is bound to a
table called TEMP_PO. I do not know how to get the records off of the
subform (TEMP_PO table) and inserted into tblPODetails from my VBA code
when the "create PO" button is clicked on the form.


Use the query builder to create an append query that selects
from the temp table and inserts into the details table. It's
pretty much a point and click operation. Run the query as part
of the "create PO" button being clicked process. If you need to
add the key field from the purchase order then edit the sql that
is generated to include it.

Jun 27 '06 #2

P: n/a
That is so easy I feel stupid now :). Thank you for the help.

Tim

rkc wrote:
tr*****@gmail.com wrote:
Good day all,

I am in the process of creating a form used to enter new purchase
orders. The thing is that I do not want to bind the form to a record
set; instead I will use a SQL insert statement in VBA to update the
tables once all the data is entered on the form. I have three fields
(single record) to fill out for the table tblPurchaseOrder and three
fields (multiple records) to fill out for table tblPODetails.

The tblPurchaseOrder info is straight forward to insert with a sql
statement. I have a subform on my form right now that is bound to a
table called TEMP_PO. I do not know how to get the records off of the
subform (TEMP_PO table) and inserted into tblPODetails from my VBA code
when the "create PO" button is clicked on the form.


Use the query builder to create an append query that selects
from the temp table and inserts into the details table. It's
pretty much a point and click operation. Run the query as part
of the "create PO" button being clicked process. If you need to
add the key field from the purchase order then edit the sql that
is generated to include it.


Jun 28 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.