How to pass parameter from subform to main form?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi, I would like to ask about how do i pass the parameter which i used in a
subform to be displayed in the main form. The parameter is used to relate
both table. The user will not have to type the parameter again as it will be
insert into the field when it is being queried.
 
Hi, I would like to ask about how do i pass the parameter which i used in a
subform to be displayed in the main form. The parameter is used to relate
both table. The user will not have to type the parameter again as it will be
insert into the field when it is being queried.

I'm not sure I understand. Where is the user typing a parameter? How
can you enter a parameter on the *subform* to control the contents of
the mainform - that seems backwards!

John W. Vinson[MVP]
 
Hi.
I'm doing the same thing. This involves contract awards. We start with pre-award data and in a subform the user's awards a contract by entering a contract number and selecting a contractor. I use the AfterUpdate event of the contractor combo box and do this:

Form_frmContractMgmnt.txtContractNo = Me.txtContractNo
Form_frmContractMgmnt.cmbContractorName = Me.cmbContractorName

I'm using 2000 format; the following should also work:

Me.Parent.txtContractNo = Me.txtContractNo
Me.Parent.cmbContractorName = Me.cmbContractorName
 

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

Back
Top