SparkyP
asked on
Populating popup form from callling form without referencing form name
I have several maintenance report forms for various types of equipment. I call the maintenance forms from the "equipment selection" form, which I make visible = false when the maintenance form opens. On each controls afterupdate event I have VBA to open a popup form if the rating is "poor" or "unsafe" (i.e. "condition of door handle").
The popup form has controls which ask why the rating was poor or unsafe, and a control for what action is needed. It takes the equipment reference and job number from equipment selection form, which is the same for types of maintenance forms, using the default value in the popup from (forms!equipmentselection! jobreferen ce) etc.
Although I can use the default value for the control that called the popup, it references the form name i.e. forms!WashingMachine!DoorH andle. (I do this by using an unbound control that references the gotfocus event of each control)
I want to use the same popup form for "Washing Machine", Tumble drier", "Oven" etc
In simplistic terms I would like Forms!"THECALLINGFORM"!doo rhandle
Hope this is doable in some shape or form.
The popup form has controls which ask why the rating was poor or unsafe, and a control for what action is needed. It takes the equipment reference and job number from equipment selection form, which is the same for types of maintenance forms, using the default value in the popup from (forms!equipmentselection!
Although I can use the default value for the control that called the popup, it references the form name i.e. forms!WashingMachine!DoorH
I want to use the same popup form for "Washing Machine", Tumble drier", "Oven" etc
In simplistic terms I would like Forms!"THECALLINGFORM"!doo
Hope this is doable in some shape or form.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you both, all methods are welcomed from a novice like myself.
make a generic form as your popup, with a txt box as functioning as a header and modify the value of the text box on the fly.