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 / Modules / DAO / VBA / January 2006

Tip: Looking for answers? Try searching our database.

Subform won't requery in VBA. Shift + F9 works after form opens

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bill R - 24 Jan 2006 18:27 GMT
I have a subform, sfrmMktData, that is requeried in the Current event of the
main form:

Me!sfrmMktData.Form.Requery

But when the form opens, the subform has not been requeried. Shift + F9
successfully accomplishes the requery.

Any suggestions?

Bill

Signature

Bill Reed

"If you can't laugh at yoursel, laugh at somebody else"

tina - 24 Jan 2006 20:08 GMT
the subform records are *not* linked to records in the main form?

> I have a subform, sfrmMktData, that is requeried in the Current event of the
> main form:
[quoted text clipped - 7 lines]
>
> Bill
Bill R - 24 Jan 2006 20:15 GMT
Yes, they are linked on valid Child and Parent ids

>the subform records are *not* linked to records in the main form?
>
[quoted text clipped - 3 lines]
>>
>> Bill

Signature

Bill Reed

"If you can't laugh at yoursel, laugh at somebody else"

tina - 24 Jan 2006 20:44 GMT
okay. what goal are you trying to achieve with a requery of the subform as
you move from one record to another in the main form?

> Yes, they are linked on valid Child and Parent ids
>
[quoted text clipped - 5 lines]
> >>
> >> Bill
Bill R - 24 Jan 2006 20:53 GMT
The problem occurs when new values are calculated for the subform. Even
though the subform is requeried in code, as described above, the continuous
subform in question displays one record with "#error" in one of the controls.
When I put my cursor in the subform and hit "Shift+F9",  the subform
requeries properly and displays the data correctly.

>okay. what goal are you trying to achieve with a requery of the subform as
>you move from one record to another in the main form?
[quoted text clipped - 4 lines]
>> >>
>> >> Bill

Signature

Bill Reed

"If you can't laugh at yoursel, laugh at somebody else"

tina - 24 Jan 2006 21:04 GMT
well, when a mainform/subform are linked properly, the subform is
essentially "requeried" each time the user navigates to a different record
in the main form, so i don't really understand why an additional requery is
needed at all. but be that as it may, it's strange that only one record in a
continuous form would show an error in a calculated control that "fixes"
itself on a requery of the subform. you've got me stumped, Bill, sorry i
wasn't able to help.

> The problem occurs when new values are calculated for the subform. Even
> though the subform is requeried in code, as described above, the continuous
[quoted text clipped - 10 lines]
> >> >>
> >> >> Bill
Bill R - 24 Jan 2006 21:08 GMT
Thanks for your effort

Bill

>well, when a mainform/subform are linked properly, the subform is
>essentially "requeried" each time the user navigates to a different record
[quoted text clipped - 9 lines]
>> >> >>
>> >> >> Bill

Signature

Bill Reed

"If you can't laugh at yoursel, laugh at somebody else"

 
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.