G
Guest
I have a form entitled "Purchase Requisitions" and a subform entitled "PR
Details." I have a button on the subform that is called "open job," and
initiates a macro that opens a new form called "Existing Job." I want the
macro to set the value of the "Job ID" field on the new form to that which is
already listed on the subform. My setvalue line looks like this:
Item [Forms]![Existing Job]![Job ID]
Expression [Forms]![PR Details]![Job ID]
As long as I have only the "PR Details" form open the macro works. But if I
have "Purchase Requisitions" open (with "PR Details" as a subform), I get an
error message that says, " . . . can't find the form 'PR Details' referred to
in a macro expression or visual basic code. *The form you referenced may be
closed or may not exist in this database. * . . . may have encountered a
compile error in a Visual Basic module for the form."
How do I write the expression so that it works?
Details." I have a button on the subform that is called "open job," and
initiates a macro that opens a new form called "Existing Job." I want the
macro to set the value of the "Job ID" field on the new form to that which is
already listed on the subform. My setvalue line looks like this:
Item [Forms]![Existing Job]![Job ID]
Expression [Forms]![PR Details]![Job ID]
As long as I have only the "PR Details" form open the macro works. But if I
have "Purchase Requisitions" open (with "PR Details" as a subform), I get an
error message that says, " . . . can't find the form 'PR Details' referred to
in a macro expression or visual basic code. *The form you referenced may be
closed or may not exist in this database. * . . . may have encountered a
compile error in a Visual Basic module for the form."
How do I write the expression so that it works?