Re: Setvalue Macro to a Subform

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Thanks It worked perfectly. In this case it seemed redundant but was
accurate

Forms![FormMain]![Nutrition]![Nutrition]

--
*****************************************
Mark M Simonian MD FAAP
681 Medical Center Dr West #106
Clovis, CA 93611
(559) 325-6850
www.markmsimonian.medem.com
"Ken Snell (MVP)" <kthsneisllis9@xxxxxxxxxxxxxxxxxx> wrote in message
news:%23KD7BnIQGHA.224@xxxxxxxxxxxxxxxxxxxxxxx
Reference to a subform must go through the main form in which the subform
is embedded:

Forms!MainFormName!SubformName!ControlOnSubform

where SubformName is the name of the subform control (the control that
actually holds the subform object) on the main form -- note that the name
of this control may or may not be the same as the Source Object of that
control.

--

Ken Snell
<MS ACCESS MVP>

"Mark S" <msimonian01@xxxxxxxxxxx> wrote in message
news:%23Kg7Q9BQGHA.2108@xxxxxxxxxxxxxxxxxxxxxxx
I don't usually have problems with simple setvalue maccros but this one
confuses me. I am using Access 2002 and bring information from a simple
open form and trying to populate a subform on another open form.

The information is being transferred but it only appears after I change
the record and return to prior record that was open on the setvalue macro

For example :
Forms![FormMain]!SubMain]![Nutrition]
Forms![FormSecondary]![Formula]

When I do this on form field not in a subform I see the information
instantly. I suspect it has something to do with the subform but I don't
know what. Any advice appreciated.

*****************************************
Mark M S





.



Relevant Pages

  • Re: Form & subForm Coordination
    ... Mark, if you are storing the subtotal in the main Orders form, you are ... Instead just show the total on the main form, without storing it in the main ... >I have a form and subform used for orders. ... > The problem I have occurs when a program user enters new data in a control ...
    (microsoft.public.access.forms)
  • Re: Populate a field on a subform from data in a pop-up modal form
    ... It is not correct to use an OpenForm action with respect to the subform. ... A subform is a control on a main form, ... Steve Schapel, Microsoft Access MVP ... Open form with my main form name ...
    (microsoft.public.access.macros)
  • Re: Setvalue Macro to a Subform
    ... Reference to a subform must go through the main form in which the subform is ... where SubformName is the name of the subform control (the control that ... open form and trying to populate a subform on another open form. ... the record and return to prior record that was open on the setvalue macro ...
    (microsoft.public.access.macros)
  • RE: Referencing field on a subsubform
    ... You can refer to the value of a control on another open form using this syntax: ... If your code is running in a subform, you can get the value of a control ...
    (microsoft.public.access.forms)
  • Re: Referencing a subform from a module
    ... > SubFormControlName is the name of the control on the main form. ... > not be the same name as the form you are using as the basis of the ... > Access normally uses the name of the form as the name of the subform ... >> Mark. ...
    (microsoft.public.access.modulesdaovba)