Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form Reference Problem driving me Nuts

Status
Not open for further replies.

tom05

Programmer
Oct 25, 2008
4
AU
Hi..Please help if you can.
I have a Main form (FormMain) which contains several subforms. On FormMain I have a commandButton (cmdBestFit). I am trying to get an image (Image1) on one of the subforms (FormImage) to respond accordingly when cmdBestFit is clicked. I have tried the following with NO luck:

Forms!FormMain.FormImage.Form!Image1.BestFit
Forms(FormImage).Form.Image1.BestFit
Forms(FormMain)(FormImage).Form.Controls(Image1).BestFit
Forms!FormMain.Forms.FormImage.Form!Image1.BestFit
Me!FormImage.Image1.BestFit
Me!Forms!FormImage!Image1.BestFit

Common error reported is "... can't find the field 'FormImage' referred to in your expression."

PS. .BestFit is a property of Image1...when I have the command button directly located on FormImage it works fine...but I would like to move it :(
 
You may try to use the expression builder to discover the real name of the control hosting your FormImage subform.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top