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 / October 2007

Tip: Looking for answers? Try searching our database.

Refresh Subform2 Query when Subform1 Control Changes

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
pcross29@gmail.com - 26 Oct 2007 00:21 GMT
I've got a "MainForm" with a tab control. On one page of the tab
control I have "Subform1" which has a control named "txtBox' tied to a
table. On another page I have another "Subform2" which has inside of
it a "Subform3" that relies on that "txtBox" from "Subform1". I want
to have that "Subform3" (which is based on a query of the table that
"txtBox" updates)  refresh when the "txtBox" changes. Here's a visual
and some code that does *not* work. Help Please!

MainForm
--Subform1 > txtBox
--Subform2 -- Subform3

Forms!MainForm!Subform1!Subform2.Form.Requery

This is attached to the txtBox AfterUpdate property. Why won't it
work?

-- Paul C., thanks.
Richnep - 26 Oct 2007 07:08 GMT
On Oct 25, 7:21 pm, pcros...@gmail.com wrote:
> I've got a "MainForm" with a tab control. On one page of the tab
> control I have "Subform1" which has a control named "txtBox' tied to a
[quoted text clipped - 14 lines]
>
> -- Paul C., thanks.

In the properties of the txtbox that will trigger the refresh when the
data changes, goto the onchange event and put in this code:

Me.Refresh

If that doesn't work use Me.Requery
pcross29@gmail.com - 26 Oct 2007 16:45 GMT
> In the properties of the txtbox that will trigger the refresh when the
> data changes, goto the onchange event and put in this code:
>
> Me.Refresh
>
> If that doesn't work use Me.Requery- Hide quoted text -

Nah. These didn't work. Wouldn't these just be refreshing the subform
that the textbox sits on? In any case, these didn't work because the
textbox is added to another textbox data entry value to calculate a
third control. As soon as you type one digit that "Refresh" or
"Requery" on the On Change property kicks in and doesn't even allow
you to enter a 2-digit number!

Thanks for looking.
 
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.