Connecting Tech Pros Worldwide Help | Site Map

Subform no-brainer

  #1  
Old February 16th, 2006, 10:45 AM
Keith Wilby
Guest
 
Posts: n/a
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.


  #2  
Old February 16th, 2006, 12:15 PM
Arno R
Guest
 
Posts: n/a

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]
  #3  
Old February 16th, 2006, 01:05 PM
Keith Wilby
Guest
 
Posts: n/a

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.


  #4  
Old February 16th, 2006, 01:55 PM
Arno R
Guest
 
Posts: n/a

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
  #5  
Old February 16th, 2006, 02:05 PM
Keith Wilby
Guest
 
Posts: n/a

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.


  #6  
Old February 16th, 2006, 02:26 PM
Arno R
Guest
 
Posts: n/a

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
  #7  
Old February 16th, 2006, 02:56 PM
Keith Wilby
Guest
 
Posts: n/a

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.


  #8  
Old February 17th, 2006, 08:55 AM
Keith Wilby
Guest
 
Posts: n/a

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
MS Access crashes when subform is on a tab control AND calculated control used. MariaTorvalds answers 16 September 24th, 2007 09:50 AM
Setting Value of Combo Box on Subform Rick answers 6 May 4th, 2006 04:15 PM
Create Form-Subform to Perform Searches ghat12@gmail.com answers 3 February 22nd, 2006 01:45 PM
Filter on subform no longer works with linked ODBC table JM answers 0 November 13th, 2005 12:48 PM
Displaying first record of subform in parent form. tdmailbox@yahoo.com answers 5 November 13th, 2005 07:38 AM