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 / General 1 / January 2006

Tip: Looking for answers? Try searching our database.

A2K - how to detect any change to a database to avoid unnecessary code execution

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Deano - 04 Jan 2006 20:48 GMT
Hi,

I have created a new form that reads in data from some intermediate tables.
These intermediate tables are used to compile data for use in a report or
the new form I have made.

Having opened the new form with this intermediate data (it provides an
aggregate view of various top-level codes in column A) the user can view and
add projections.

The user can close the form and then make changes in the database.  At this
point I know if the form is reopened then my code will repopulate column A
with the updated figures.

Is there a way of determining if the data has changed before I run that
code?  That way I can avoid running the repopulation code.  And if it's
changed I can display a message to the user.  I can think of a number of
clunky ways of doing it but would like alternate opinions.  Obviously I'm
looking for a general sort of solution as I have quite a few tables that
could be changed.  I wish there was some sort of built-in global flag that
could track this sort of thing, would make it alot easier.

thanks
Martin
Red - 04 Jan 2006 22:06 GMT
You could always mek your own little Global Boolean flag :D

For example
(in some module)
Public MyTableHasChanged as Boolean = False

Then, when ever you update the master table(s) (however you may do
that), you can set the flag to true.... then, when the intermediate
tables are updated, then set it back to false.... just an idea though
:D

~Red
Deano - 05 Jan 2006 02:01 GMT
> You could always mek your own little Global Boolean flag :D
>
[quoted text clipped - 8 lines]
>
> ~Red

Thanks, not a bad idea.  I have to identify all the possible places the data
change could happen but that could work.
 
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.