Connecting Tech Pros Worldwide Forums | Help | Site Map

Subform no-brainer

Keith Wilby
Guest
 
Posts: n/a
#1: Feb 16 '06
I'm having another one of *those* days today. I have a form which can have
many data sources which are chosen from an option group. This all works
fine except that the subform doesn't refresh even though I'm calling the
main form's open event from the option group's update event. Any clues?

Thanks.
Keith.



Arno R
Guest
 
Posts: n/a
#2: Feb 16 '06

re: Subform no-brainer


Hi Keith,
Are you trying to (re)set the sourceobject for the sub ??

Something like
Me!SubForm.SourceObject = "YourSourceObject" should work

Arno R

"Keith Wilby" <here@there.com> schreef in bericht news:43f45372$1_1@glkas0286.greenlnk.net...[color=blue]
> I'm having another one of *those* days today. I have a form which can have
> many data sources which are chosen from an option group. This all works
> fine except that the subform doesn't refresh even though I'm calling the
> main form's open event from the option group's update event. Any clues?
>
> Thanks.
> Keith.
>
>[/color]
Keith Wilby
Guest
 
Posts: n/a
#3: Feb 16 '06

re: Subform no-brainer


"Arno R" <arraNOcomSPAM@tiscali.nl> wrote in message
news:43f468ca$0$2031$ba620dc5@text.nova.planet.nl. ..
Hi Keith,
Are you trying to (re)set the sourceobject for the sub ??

Something like
Me!SubForm.SourceObject = "YourSourceObject" should work

Arno R

Hi Arno, thanks for the response. In my subform's open event I have VBA SQL
code which defines its record source. It's this that isn't refreshing when
the main form's open even fires. I'm using global variables as containers
for project names, the contents of which change depending on which option is
selected from the option group on the main form. The contents of the GVs
are then used in the SQL code.

It's a bit difficult for me to explain but I hope you get the gist.

Regards,
Keith.


Arno R
Guest
 
Posts: n/a
#4: Feb 16 '06

re: Subform no-brainer


"Keith Wilby" <here@there.com> schreef in bericht news:43f47437$1_1@glkas0286.greenlnk.net...[color=blue]
> "Arno R" <arraNOcomSPAM@tiscali.nl> wrote in message
> news:43f468ca$0$2031$ba620dc5@text.nova.planet.nl. ..
> Hi Keith,
> Are you trying to (re)set the sourceobject for the sub ??
>
> Something like
> Me!SubForm.SourceObject = "YourSourceObject" should work
>
> Arno R
>
> Hi Arno, thanks for the response. In my subform's open event I have VBA SQL
> code which defines its record source. It's this that isn't refreshing when
> the main form's open even fires. I'm using global variables as containers
> for project names, the contents of which change depending on which option is
> selected from the option group on the main form. The contents of the GVs
> are then used in the SQL code.
>
> It's a bit difficult for me to explain but I hope you get the gist.
>
> Regards,
> Keith. [/color]


I guess your sub's open event will *not* fire when you call the mainform's open event.
I guess you need to call the sub's open event explicitly in this case.
(Or just close and reopen the main form?)

HTH
Arno R
Keith Wilby
Guest
 
Posts: n/a
#5: Feb 16 '06

re: Subform no-brainer


"Arno R" <arraNOcomSPAM@tiscali.nl> wrote in message
news:43f481a1$1$2022$ba620dc5@text.nova.planet.nl. ..
"Keith Wilby" <here@there.com> schreef in bericht
news:43f47437$1_1@glkas0286.greenlnk.net...[color=blue]
> "Arno R" <arraNOcomSPAM@tiscali.nl> wrote in message
> news:43f468ca$0$2031$ba620dc5@text.nova.planet.nl. ..
> Hi Keith,
> Are you trying to (re)set the sourceobject for the sub ??
>
> Something like
> Me!SubForm.SourceObject = "YourSourceObject" should work
>
> Arno R
>
> Hi Arno, thanks for the response. In my subform's open event I have VBA
> SQL
> code which defines its record source. It's this that isn't refreshing
> when
> the main form's open even fires. I'm using global variables as containers
> for project names, the contents of which change depending on which option
> is
> selected from the option group on the main form. The contents of the GVs
> are then used in the SQL code.
>
> It's a bit difficult for me to explain but I hope you get the gist.
>
> Regards,
> Keith.[/color]

[color=blue]
> I guess your sub's open event will *not* fire when you call the mainform's
> open event.
> I guess you need to call the sub's open event explicitly in this case.
> (Or just close and reopen the main form?)[/color]
[color=blue]
> HTH
> Arno R[/color]

Thanks Arno, I had been trying to fire the sub's open event from the main
form but can't get the syntax right. Thanks for your patience, I feel like
a total clueless newbie on this.

Keith.


Arno R
Guest
 
Posts: n/a
#6: Feb 16 '06

re: Subform no-brainer



"Keith Wilby" <here@there.com> schreef in bericht news:43f482a3$1_1@glkas0286.greenlnk.net...[color=blue]
> "Arno R" <arraNOcomSPAM@tiscali.nl> wrote in message
> news:43f481a1$1$2022$ba620dc5@text.nova.planet.nl. ..
> "Keith Wilby" <here@there.com> schreef in bericht
> news:43f47437$1_1@glkas0286.greenlnk.net...[color=green]
>> "Arno R" <arraNOcomSPAM@tiscali.nl> wrote in message
>> news:43f468ca$0$2031$ba620dc5@text.nova.planet.nl. ..
>> Hi Keith,
>> Are you trying to (re)set the sourceobject for the sub ??
>>
>> Something like
>> Me!SubForm.SourceObject = "YourSourceObject" should work
>>
>> Arno R
>>
>> Hi Arno, thanks for the response. In my subform's open event I have VBA
>> SQL
>> code which defines its record source. It's this that isn't refreshing
>> when
>> the main form's open even fires. I'm using global variables as containers
>> for project names, the contents of which change depending on which option
>> is
>> selected from the option group on the main form. The contents of the GVs
>> are then used in the SQL code.
>>
>> It's a bit difficult for me to explain but I hope you get the gist.
>>
>> Regards,
>> Keith.[/color]
>
> [color=green]
>> I guess your sub's open event will *not* fire when you call the mainform's
>> open event.
>> I guess you need to call the sub's open event explicitly in this case.
>> (Or just close and reopen the main form?)[/color]
> [color=green]
>> HTH
>> Arno R[/color]
>
> Thanks Arno, I had been trying to fire the sub's open event from the main
> form but can't get the syntax right. Thanks for your patience, I feel like
> a total clueless newbie on this.[/color]

You are welcome Keith,
Try: Call Form_NameOfSubForm.Form_Open (False)

Arno R
Keith Wilby
Guest
 
Posts: n/a
#7: Feb 16 '06

re: Subform no-brainer


"Arno R" <arraNOcomSPAM@tiscali.nl> wrote in message
news:43f487c3$0$2025$ba620dc5@text.nova.planet.nl. ..

"Keith Wilby" <here@there.com> schreef in bericht
news:43f482a3$1_1@glkas0286.greenlnk.net...[color=blue]
> "Arno R" <arraNOcomSPAM@tiscali.nl> wrote in message
> news:43f481a1$1$2022$ba620dc5@text.nova.planet.nl. ..
> "Keith Wilby" <here@there.com> schreef in bericht
> news:43f47437$1_1@glkas0286.greenlnk.net...[color=green]
>> "Arno R" <arraNOcomSPAM@tiscali.nl> wrote in message
>> news:43f468ca$0$2031$ba620dc5@text.nova.planet.nl. ..
>> Hi Keith,
>> Are you trying to (re)set the sourceobject for the sub ??
>>
>> Something like
>> Me!SubForm.SourceObject = "YourSourceObject" should work
>>
>> Arno R
>>
>> Hi Arno, thanks for the response. In my subform's open event I have VBA
>> SQL
>> code which defines its record source. It's this that isn't refreshing
>> when
>> the main form's open even fires. I'm using global variables as
>> containers
>> for project names, the contents of which change depending on which option
>> is
>> selected from the option group on the main form. The contents of the GVs
>> are then used in the SQL code.
>>
>> It's a bit difficult for me to explain but I hope you get the gist.
>>
>> Regards,
>> Keith.[/color]
>
>[color=green]
>> I guess your sub's open event will *not* fire when you call the
>> mainform's
>> open event.
>> I guess you need to call the sub's open event explicitly in this case.
>> (Or just close and reopen the main form?)[/color]
>[color=green]
>> HTH
>> Arno R[/color]
>
> Thanks Arno, I had been trying to fire the sub's open event from the main
> form but can't get the syntax right. Thanks for your patience, I feel
> like
> a total clueless newbie on this.[/color]

You are welcome Keith,
Try: Call Form_NameOfSubForm.Form_Open (False)

Arno R

Tried that Arno but it won't compile. This is a "nice to have" that I've
spent way too much time on so I'm going to leave it now. Thanks anyway.

Regards,
Keith.


Keith Wilby
Guest
 
Posts: n/a
#8: Feb 17 '06

re: Subform no-brainer


"Arno R" <arraNOcomSPAM@tiscali.nl> wrote in message
news:43f481a1$1$2022$ba620dc5@text.nova.planet.nl. ..
[color=blue]
> (Or just close and reopen the main form?)[/color]

Hi Arno, I got it to work using this method in the end, thanks for the tip.

Regards,
Keith.


Closed Thread