Subform no-brainer 
February 16th, 2006, 10:45 AM
| | | |
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. | 
February 16th, 2006, 12:15 PM
| | | | 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] | 
February 16th, 2006, 01:05 PM
| | | | 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. | 
February 16th, 2006, 01:55 PM
| | | | 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 | 
February 16th, 2006, 02:05 PM
| | | | 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. | 
February 16th, 2006, 02:26 PM
| | | | 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 | 
February 16th, 2006, 02:56 PM
| | | | 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. | 
February 17th, 2006, 08:55 AM
| | | | 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. |  | | | | /bytes/about
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 225,662 network members.
|