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 / Forms / March 2008

Tip: Looking for answers? Try searching our database.

Requery Subform

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Lori - 04 Mar 2008 16:21 GMT
I have a main form (no data source) that I use to hold objects for navigation
(QBF fields & buttons, Report form buttons...)  On the this form I placed a
subform (PendingCalls) based on query to give show the basics of pending
calls only, on that subform is a button that launches a seperate form
PendingCallDetail.

When I click the Close button on PendingCallDetail, I would like the form to
close and update the subform on the main page.  I've been playing with
requery for weeks, trying some of the suggestions but nothing seems to work.  
I've tried both macro and code.

How do I refer to the Subform of one form from third form?  I keep messages
about control not existing.

Lori
Klatuu - 04 Mar 2008 16:55 GMT
I would use the Unload event of the detail form.  The correct syntax is:

Forms!FormName!SubFormControlName.Form.Requery

Note: SubFormControlName is the name of the subform control on the main
form.  It is not the name of the form being used in the subform control.  
Access will, be default, name them the same, but IMHO, they should not have
the same name.
Signature

Dave Hargis, Microsoft Access MVP

> I have a main form (no data source) that I use to hold objects for navigation
> (QBF fields & buttons, Report form buttons...)  On the this form I placed a
[quoted text clipped - 11 lines]
>
> Lori
Lori - 04 Mar 2008 17:21 GMT
Dave~

See this is where I keep getting messed up after reveiwing the posts here.  
I called the main form: f_Main, the subform f_Pending_sf.  Your suggesting
that I change the name (not the source object) to something else like
f_Pending_sf_ctrl.  So then the syntax would read...

Forms!f_Main!f_Pending_sf_ctrl.Form.Requery

Just tried it.  IT WORKS!  THANK YOU!

So....  Yes, I'm one of those ... with another dbase, similar but different
situation.

If I wanted to requery not the whole subform but a combo box for a
particular record, I would replace .Form. with the name of the specific
control?

Forms!f_Main!f_Pending_sf_ctrl.cmb_box_name.Requery

~Lori

> I would use the Unload event of the detail form.  The correct syntax is:
>
[quoted text clipped - 20 lines]
> >
> > Lori
Klatuu - 04 Mar 2008 17:31 GMT
Signature

Dave Hargis, Microsoft Access MVP

> Dave~
>
[quoted text clipped - 15 lines]
>
> Forms!f_Main!f_Pending_sf_ctrl.cmb_box_name.Requery

No.  The Form property of the subform control has to be used anytime you are
referring to anything on the subform.

The subform control is NOT a form.  It is a control on you main form, just
like any other control.  One of its properties is Source Object.  This
property identifies the name of the form to attach as the subform.  
Therefore, you have to include the Form property if you are addressing
anything on the form that is the subform.

> ~Lori
>
[quoted text clipped - 22 lines]
> > >
> > > Lori
Lori - 06 Mar 2008 14:09 GMT
Dave~

Thanks for the help.  I'm closing forms right and left now.

~Lori

> > Dave~
> >
[quoted text clipped - 51 lines]
> > > >
> > > > Lori
 
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.