Link to home
Start Free TrialLog in
Avatar of SparkyP
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!jobreference) etc.

Although I can use the default value for the control that called the popup, it references the form name i.e. forms!WashingMachine!DoorHandle. (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"!doorhandle

Hope this is doable in some shape or form.
ASKER CERTIFIED SOLUTION
Avatar of Anders Ebro (Microsoft MVP)
Anders Ebro (Microsoft MVP)
Flag of Denmark image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Alternatively:

      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.
Avatar of SparkyP
SparkyP

ASKER

Thank you both, all methods are welcomed from a novice like myself.