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 / April 2008

Tip: Looking for answers? Try searching our database.

REQUERY SUBFORM

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
-debi- - 14 Apr 2008 19:35 GMT
Good Day,

Main Form [frmDATE]
Sub Form [frmCOUNT]

On the subform ON Enter, I have DoCmd.Requery, which works fine after I
click on the subform.

When I try to requey the subform from the mainform using a Macro Requery
[forms]![frmCOUNT], it says it's either not in the current form or it can't
find that form name.

I have combo boxes in my subform that work fine for entering data, but if I
just want to go record by record from the main form, the sub form doesn't
show the proper data unless I click on it to use the requery in the ON Enter.

Please help.  Thank you!  -debi-
boblarson - 14 Apr 2008 21:06 GMT
To requery a subform you have to reference the CONTROL that houses the
subform on the main form.  And, you have to use .Form. to tell Access you
want the property, or method, of the subform and not the subform container.

Me.YourSubformContainerControlName.Form.Requery

Signature

Bob Larson
Access World Forums Super Moderator

Tutorials at http://www.btabdevelopment.com

__________________________________

> Good Day,
>
[quoted text clipped - 13 lines]
>
> Please help.  Thank you!  -debi-
-debi- - 17 Apr 2008 12:21 GMT
Hi Bob, I'll give it a try.  I've read most of the "post" on this and for
some reason just can't get it.  I haven't tried the .Form.

Thank you very much for you response.  -debi-

> To requery a subform you have to reference the CONTROL that houses the
> subform on the main form.  And, you have to use .Form. to tell Access you
[quoted text clipped - 19 lines]
> >
> > Please help.  Thank you!  -debi-
boblarson - 17 Apr 2008 14:09 GMT
debi:

In Me.YourSubformContainerControlName.Form.Requery

The .Form. part tells Access that you are wanting a property, or method, of
the form within the subform container control.  So, you should be able to
take the code I gave you and replace the YourSubformContainerControlName with
the actual name of the subform container on the main form and don't change
anything else from what was written.

See here for more about subforms:

http://www.btabdevelopment.com/main/QuickTutorials/Easywaytorememberhowtoreferen
cesubforms/tabid/76/Default.aspx


http://www.btabdevelopment.com/main/QuickTutorials/Easywaytorememberhowtoreferen
cesubforms/Refertosubformsincontrolsources/tabid/106/Default.aspx


Signature

Bob Larson
Access World Forums Super Moderator

Tutorials at http://www.btabdevelopment.com

__________________________________

> Hi Bob, I'll give it a try.  I've read most of the "post" on this and for
> some reason just can't get it.  I haven't tried the .Form.
[quoted text clipped - 24 lines]
> > >
> > > Please help.  Thank you!  -debi-
-debi- - 18 Apr 2008 13:18 GMT
Hi Bob,

Thank you very much!  I checked out your website.......it's great!  Thanks
again for your support!!!!!!!!!!!!!!!  -debi-

> debi:
>
[quoted text clipped - 40 lines]
> > > >
> > > > Please help.  Thank you!  -debi-
 
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.