Help! Suck on copy data from form

M

Michael Horne

New Access 2003 user here.

Copying data from parent form to subform is what I am trying to do, but I
need a little help in getting it implemented correctly.

I have a Query that pulls selected data and displays on the form
(frm_QA_Review_FY09) based upon Contract Number entered by user. The
Contractor Name is displayed in Text94 (textbox).

User then select dropdown values in the subform (frm_QA_Review_FY09_subform)
.. All data from the subform is saved into a new table (tbl_QA_Review_FY09).

I must have the ability to save the selected data (Contractor Name) from the
form into the new table, because I have to email the new table to user in a
different section without security access to run some basic reports.

What I have tried below has failed to populate:

Text Box: Text398 Control Source: =me!parent!text94
Text Box: Text400 Control Source: =me!parent![tbl_contracts.nm_contractor]
Text Box: Text401 Control Source:
=me!frm_qa_review_fy09![tbl_contracts.nm_contractor]
Text Box: Text402 Control Source: =me!frm_qa_review_fy09!text94
Text Box: Text405 Control Source:
=me!frm_qa_review_fy09_subform![tbl_contracts.nm_contractor]
Text Box: Text406 Control Source: =me!frm_qa_review_fy09!text94
Text Box: Text407 Control Source: =Text407!frm_qa_review_fa09!text94
Text Box: Text408 Control Source:
=[Text408]![frm_qa_review_fa09]![tbl_contracts.nm_contractor]
Text Box: Text409 Control Source:
=[Text409]![frm_qa_review_fa09]![tbl_contracts.nm_contractor]

Text Box: Text403 Control Source: Nm_Contractor Before Update:
=me!text403.Form!text94
Text Box: Text404 Control Source: Nm_Contractor Before Update:
=me!text404.Form![tbl_contracts.nm_contractor]

What am I doing wrong?
 
C

Chegu Tom

Which form has the focus (and the code) The main form or the subform
What event causes the code to be run

if the subform
me.text398=me.parent!text94

if on the parent form
me.subformname!text398 = me.text94


There should be a table or query underlying the subform. you can also use
SQL to write values to the table


Tip: Rename your text boxes to names that have meaning for you like
textContractorName or textAddress etc it will make things easier to follow
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top