Group:  Microsoft Access ยป microsoft.public.access.macros
Thread: Setvalue Macro to a Subform

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

Setvalue Macro to a Subform
"Mark S" <msimonian01[ at ]comcast.net> 05.03.2006 06:37:58
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


Re: Setvalue Macro to a Subform
"Ken Snell \(MVP\)" <kthsneisllis9[ at ]ncoomcastt.renaetl> 05.03.2006 19:20:40
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[ at ]comcast.net> wrote in message
news:%23Kg7Q9BQGHA.2108[ at ]TK2MSFTNGP10.phx.gbl...
[Quoted Text]
>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
>


Re: Setvalue Macro to a Subform
"Mark S" <msimonian01[ at ]comcast.net> 06.03.2006 14:31:18
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[ at ]ncoomcastt.renaetl> wrote in message
news:%23KD7BnIQGHA.224[ at ]TK2MSFTNGP10.phx.gbl...
[Quoted Text]
> 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[ at ]comcast.net> wrote in message
> news:%23Kg7Q9BQGHA.2108[ at ]TK2MSFTNGP10.phx.gbl...
>>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
>>
>
>


Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net