[AccessD] FW: How to set flag

Reuben Cummings reuben at gfconsultants.com
Thu Oct 2 11:17:08 CDT 2003


FW: How to set flagEverytime it opens you could check the day and the flag.
If the day <> Wednesday then set the flag = false (or whatever) and exit the
function.  If day = Wednesday and flag = false then run the code and set the
flag = true.  Next time day = Wednesday and flag = true so skip the code.

The reason I say to set the flag = false any other day of the week is that
this would almost gaurantee that the flag is reset even if the app isn't
opened every day.

Of course, to avoid that you could store the number of the week when the
code last ran and compare it to the the new week number on the next
Wednesday.  If the week numbers do not match then run the code.
Reuben Cummings
GFC, LLC
phone: 812.523.1017
email: reuben at gfconsultants.com

  -----Original Message-----
  From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Kaup, Chester A
  Sent: Thursday, October 02, 2003 10:42 AM
  To: accessd at databaseadvisors.com
  Subject: [AccessD] FW: How to set flag


  I have a database with some code that runs only on Wednesday. No problem
do that with If Weekday(DATE) = 4 .
  What I need to do is set some kind flag so that the first time the
database opens on Wednesday the code runs but not on subsequent openings. I
am at a loss of how to do this. Maybe I need to track openings of database?
Thanks

  No trees were killed in the sending of this message. However a large
number of electrons were terribly inconvenienced.




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://databaseadvisors.com/pipermail/accessd/attachments/20031002/2be90bf5/attachment-0001.html>


More information about the AccessD mailing list