Re: Referring to a object in a subform?

From: John Vinson (jvinson_at_STOP_SPAM.WysardOfInfo.com)
Date: 03/06/04


Date: Fri, 05 Mar 2004 17:28:07 -0700

On Fri, 5 Mar 2004 12:37:35 -0800, "Steve" <steveseslar@yahoo.com>
wrote:

> If Forms![frmDeviceCheck]![fsubDeviceCheck]!_
>EquipmentType = "Pulse Generator" Then

Is fsubDeviceCheck the name of the *form object* inside the subform
control, or the name *of the control itself*, the box on the mainform?
It's the latter that is required.

I'd suggest being explicit and using

Forms![frmDeviceCheck]![fsubDeviceCheck],Form!EquipmentType

                  John W. Vinson[MVP]
    Come for live chats every Tuesday and Thursday
http://go.compuserve.com/msdevapps?loc=us&access=public



Relevant Pages

  • Re: Does a textbox have to have a name reference, or can I use a w
    ... Yes, you are correct about the control being outside of the main form, it ... mainform, then it's in the mainform - not outside of it. ... because the code is called from a command button on the mainform; ... the "previous control" was the subform control (the ...
    (microsoft.public.access.formscoding)
  • Re: Main form and subform
    ... controls on both the mainform and the subform. ... this is a common newbie mistake with combobox controls. ... so now each combobox control will *display* the text values you want to see, ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Does a textbox have to have a name reference, or can I use a w
    ... those two forms are set as the SourceObject of subform ... Yes, you are correct about the control being outside of the main form, it ... mainform, then it's in the mainform - not outside of it. ... because the code is called from a command button on the mainform; ...
    (microsoft.public.access.formscoding)
  • Re: Main form and subform
    ... On the MainForm ... Control Source = WorkCategory ... On the SubForm = Tab ... Control Source = ClaimMonitoring ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Slow Code
    ... value in textbox Text171 on the subform, then set the value of this textbox ... executing within the mainform. ... run the expression in the subform, ... no point using code to hide/unhide the control; ...
    (microsoft.public.access.forms)