By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,611 Members | 1,692 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,611 IT Pros & Developers. It's quick & easy.

Subform no-brainer

P: 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.
Feb 16 '06 #1
Share this Question
Share on Google+
7 Replies


P: n/a
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" <he**@there.com> schreef in bericht news:43**********@glkas0286.greenlnk.net...
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.

Feb 16 '06 #2

P: n/a
"Arno R" <ar***********@tiscali.nl> wrote in message
news:43**********************@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.
Feb 16 '06 #3

P: n/a
"Keith Wilby" <he**@there.com> schreef in bericht news:43**********@glkas0286.greenlnk.net...
"Arno R" <ar***********@tiscali.nl> wrote in message
news:43**********************@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.



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
Feb 16 '06 #4

P: n/a
"Arno R" <ar***********@tiscali.nl> wrote in message
news:43**********************@text.nova.planet.nl. ..
"Keith Wilby" <he**@there.com> schreef in bericht
news:43**********@glkas0286.greenlnk.net...
"Arno R" <ar***********@tiscali.nl> wrote in message
news:43**********************@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.
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


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.
Feb 16 '06 #5

P: n/a

"Keith Wilby" <he**@there.com> schreef in bericht news:43**********@glkas0286.greenlnk.net...
"Arno R" <ar***********@tiscali.nl> wrote in message
news:43**********************@text.nova.planet.nl. ..
"Keith Wilby" <he**@there.com> schreef in bericht
news:43**********@glkas0286.greenlnk.net...
"Arno R" <ar***********@tiscali.nl> wrote in message
news:43**********************@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.


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


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.


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

Arno R
Feb 16 '06 #6

P: n/a
"Arno R" <ar***********@tiscali.nl> wrote in message
news:43**********************@text.nova.planet.nl. ..

"Keith Wilby" <he**@there.com> schreef in bericht
news:43**********@glkas0286.greenlnk.net...
"Arno R" <ar***********@tiscali.nl> wrote in message
news:43**********************@text.nova.planet.nl. ..
"Keith Wilby" <he**@there.com> schreef in bericht
news:43**********@glkas0286.greenlnk.net...
"Arno R" <ar***********@tiscali.nl> wrote in message
news:43**********************@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.


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


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.


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.
Feb 16 '06 #7

P: n/a
"Arno R" <ar***********@tiscali.nl> wrote in message
news:43**********************@text.nova.planet.nl. ..
(Or just close and reopen the main form?)


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

Regards,
Keith.
Feb 17 '06 #8

This discussion thread is closed

Replies have been disabled for this discussion.