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 2 / May 2007

Tip: Looking for answers? Try searching our database.

Date Validation Question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
KC Classic - 14 May 2007 16:19 GMT
I have a macro that runs several appencd queries once a command button on the
Switchboard is clicked and updates 5 separate tables with "current" data.  
Although this database in only used by about 4 people overall (and mostl of
the time by only one person),  there is a distinct possibility that a person
could update the tables more than one time with "current" data. This is a
real problem to correct.

I would like to be able to have the command button function only one time
each day and then be "disabled" after the tables have been updated.  Is this
possible?    

We just use some basic fields as follow:

txtMgmtCo
txtFund
txtAccount
dtmSupersheetDate
txtStateCode
curAmount

The underlying append queries are not terribly complicated and update the
tables with the previous day data.  Your thoughts and responses will be
appreciated.

Thank you.

KC Classic
Maurice - 14 May 2007 19:07 GMT
First we have to know... have you split the db or are we talking about a
single db.
If you have split the db then you'd have to check if the different
switchboards weren't open during the disabling of the button you want to
disable.

Maurice

> I have a macro that runs several appencd queries once a command button on the
> Switchboard is clicked and updates 5 separate tables with "current" data.  
[quoted text clipped - 23 lines]
>
> KC Classic
KC Classic - 14 May 2007 19:16 GMT
Thanks for your response.

This is a single database - not a split database.

> First we have to know... have you split the db or are we talking about a
> single db.
[quoted text clipped - 31 lines]
> >
> > KC Classic
Dale Fye - 14 May 2007 19:16 GMT
KC,

I usually keep a table of program parameters (tbl_prg_Parameters) in my
back-end database.  You could create such a table and add a date field to
that table where you could store the date last updated.  Then in your splash
screens load event, you could check to see whether that date was equal to
todays date.  If so you could disable the control.  When you click the
control to update your tables, then also update this field to indicate todays
date.

That leaves you with the case where another user opens the form, but doesn't
do the update.  When you perform the update their command button will still
be enabled.  You can overcome this by: 1) putting some code in the click
event to test and see whether the value of that field has changed, and not do
the upload if it has.  In which case, you should also disable the control, or
2) You could use the splash screens timer event to check the value of that
field every so often.  Once it sees that the updates have been done, change
the timerinterval to zero so it doesn't do the checks any more that day.

HTH
Dale
Signature

Email address is not valid.
Please reply to newsgroup only.

> First we have to know... have you split the db or are we talking about a
> single db.
[quoted text clipped - 31 lines]
> >
> > KC Classic
 
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.