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 Programming / July 2005

Tip: Looking for answers? Try searching our database.

requery repaint subform timing

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Apmarg - 15 Jul 2005 16:03 GMT
Using Access 2000.  Trying to test a calculated value on a subform after
changing an item on a mainform. It essentially counts the details of the
subform. I cannot get the correct value to be tested always returning zero
for the test, but the correct value is displayed when run in debug.  Various
combinations of repaint, requery, refresh have not helped.  How can I force
it to test the control after it contains its new value?
Marshall Barton - 15 Jul 2005 22:12 GMT
>Using Access 2000.  Trying to test a calculated value on a subform after
>changing an item on a mainform. It essentially counts the details of the
>subform. I cannot get the correct value to be tested always returning zero
>for the test, but the correct value is displayed when run in debug.  Various
>combinations of repaint, requery, refresh have not helped.  How can I force
>it to test the control after it contains its new value?

You do NOT want to go there!  The timing of Access control
calculations is always slower than VBA code execution.

Try to find a way to use VBA (probably in the main form
control's AfterUpdate event) to perform the subform
calculation.

That's not practical for aggregate functions (Count, Sum,
etc) so, in this, case it's better to just forget using VBA
at all and use another expression in a main form text box
that refers to the subform value.

Signature

Marsh
MVP [MS Access]

 
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.