Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 1 / February 2006

Tip: Looking for answers? Try searching our database.

Subform no-brainer

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Keith Wilby - 16 Feb 2006 10:37 GMT
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 - 16 Feb 2006 11:50 GMT
Hi Keith,
Are you trying to (re)set the sourceobject for the sub ??

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

Arno R

> 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
[quoted text clipped - 3 lines]
> Thanks.
> Keith.
Keith Wilby - 16 Feb 2006 12:57 GMT
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 - 16 Feb 2006 13:42 GMT
> Hi Keith,
> Are you trying to (re)set the sourceobject for the sub ??
[quoted text clipped - 15 lines]
> 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
Keith Wilby - 16 Feb 2006 13:58 GMT
"Keith Wilby" <here@there.com> schreef in bericht
news:43f47437$1_1@glkas0286.greenlnk.net...
> Hi Keith,
> Are you trying to (re)set the sourceobject for the sub ??
[quoted text clipped - 18 lines]
> 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.
Arno R - 16 Feb 2006 14:09 GMT
> "Keith Wilby" <here@there.com> schreef in bericht
> news:43f47437$1_1@glkas0286.greenlnk.net...
[quoted text clipped - 32 lines]
> 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
Keith Wilby - 16 Feb 2006 14:42 GMT
"Keith Wilby" <here@there.com> schreef in bericht
news:43f482a3$1_1@glkas0286.greenlnk.net...
> "Keith Wilby" <here@there.com> schreef in bericht
> news:43f47437$1_1@glkas0286.greenlnk.net...
[quoted text clipped - 37 lines]
> 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.
Keith Wilby - 17 Feb 2006 08:47 GMT
> (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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.