Hey guys, I am really a novice in VBA and would appreciate
If you could help me with a problem I am having with regards
To passing data between 2 unlinked forms in an Access 2003 databases
I am writing an Estimation program and have 2 forms the
General Spec Form named “frm_EstSpec” on which there are 40 text boxes,Several combo boxes and a command Button to run the Cost Estimationform (frm_EstCost).
I have created global variables in the standard modules to hold data that is passed back and forth the Cost estimation form “frm_EstCost” where the estimate is calculated and saved. I want to display the Estimation No, Cost and a few other data being held in the global variables on the General Spec form “frm_EstSpec” when focus returns to it but don’t know which event to trap it.
and display the data on the form.
I have tried Me.Requery in the current event of the form and after the code in the Command button calling the “frm_EstCost” form but without success.
I don’t know what the problem might be, please help me.
On the command button to execute the Cost Estimation form
I pass of data to the global variables like
PMachModel = Me!MachModel
PMachSize = Me!MachSize
PEstNo = “ “ ‘ the number is created in the cost Estimation form
And when the Save button is clicked on the Cost Estimation form
PMachModel = Me!CMachModel
PMachSize = Me!CMachSize
PEstNo = Me!EstNo
I need to know which event to use to capture the variables and show on the
General Spec Form frm_EstSpec
Me!MachModel = PMachModel
Me!MachSize = PMachSize
Me!EstNo= PEstNo
Don’t know whether it will help both forms are not modal, when I click on the command
button the Cost estimation form “frm_EstCost” just springs up while the general Spec form becomes invisible and when I click the END command button on the form
“frm_EstCost” the form the spec form “frm_EstSpec” is visible once more.
Thanks for devoting time to my problem.
Massamiya
If you could help me with a problem I am having with regards
To passing data between 2 unlinked forms in an Access 2003 databases
I am writing an Estimation program and have 2 forms the
General Spec Form named “frm_EstSpec” on which there are 40 text boxes,Several combo boxes and a command Button to run the Cost Estimationform (frm_EstCost).
I have created global variables in the standard modules to hold data that is passed back and forth the Cost estimation form “frm_EstCost” where the estimate is calculated and saved. I want to display the Estimation No, Cost and a few other data being held in the global variables on the General Spec form “frm_EstSpec” when focus returns to it but don’t know which event to trap it.
and display the data on the form.
I have tried Me.Requery in the current event of the form and after the code in the Command button calling the “frm_EstCost” form but without success.
I don’t know what the problem might be, please help me.
On the command button to execute the Cost Estimation form
I pass of data to the global variables like
PMachModel = Me!MachModel
PMachSize = Me!MachSize
PEstNo = “ “ ‘ the number is created in the cost Estimation form
And when the Save button is clicked on the Cost Estimation form
PMachModel = Me!CMachModel
PMachSize = Me!CMachSize
PEstNo = Me!EstNo
I need to know which event to use to capture the variables and show on the
General Spec Form frm_EstSpec
Me!MachModel = PMachModel
Me!MachSize = PMachSize
Me!EstNo= PEstNo
Don’t know whether it will help both forms are not modal, when I click on the command
button the Cost estimation form “frm_EstCost” just springs up while the general Spec form becomes invisible and when I click the END command button on the form
“frm_EstCost” the form the spec form “frm_EstSpec” is visible once more.
Thanks for devoting time to my problem.
Massamiya
Last edited: