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

Tip: Looking for answers? Try searching our database.

Requery the subform

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
BL - 04 Jul 2007 18:12 GMT
Hi, everybody,

I have created a "Master" form with a "Detail" subform.  In the subform, I
have an [Add New] botton that will open the "INPUT" form to add new record as
some of the reference field is not available in the "Detail" subform.  There
is a [Add] botton  on the "INPUT" form to add the record to the table and
close the form.

I try a couple way but I cannot refresh the information on "Detail' subform,
any suggestion or method I should use?  As there are forms open and close,
can I write the get focus or lose focus event?  

Thank you very much for your kind advice.

Regards,

BL
Damon Heron - 04 Jul 2007 18:19 GMT
on your AddNew click event, after you call the subform,
enter

Forms!YourMainform.yoursubform.Requery

Damon

> Hi, everybody,
>
[quoted text clipped - 16 lines]
>
> BL
Damon Heron - 04 Jul 2007 21:55 GMT
i meant after u call your Input form...

Damon

> on your AddNew click event, after you call the subform,
> enter
[quoted text clipped - 25 lines]
>>
>> BL
BL - 05 Jul 2007 02:06 GMT
Hi, Damon,

Thank you very much for your response.  I try the code but I have an error
saying that Access cannot find the form "yoursubform" in a macro expression
or Visual Basic Code.  I try to create a simple form without a subform and
use the same code [Forms![Simple_Form].requery, and I got the same error.

Can you help me for that?  Moreover, if I use more than one form in the
process, how does Access behave when executing code in different form module?
Thanks again for your time.

Regards,

BL

> i meant after u call your Input form...
>
[quoted text clipped - 29 lines]
> >>
> >> BL
Damon Heron - 05 Jul 2007 02:37 GMT
You have to substitute the name of your two forms.  that is a generic
example.

Damon

> Hi, Damon,
>
[quoted text clipped - 48 lines]
>> >>
>> >> BL
 
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



©2009 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.