Can a macro in access be trigged by a future date appearing in a .

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Can a marcro in access be trigged by a future date which is stored in the
same database?
 
On Fri, 8 Apr 2005 09:05:04 -0700, "David Harwood" <David
Can a marcro in access be trigged by a future date which is stored in the
same database?

Please explain.

Do you want to trigger some event at the time that the date is stored
into a table field; or do you want Access to run something whenever
that date is reached? The latter will be tough - Access might not even
be OPEN on that day.

What kind of event do you want to happen, under what circumstances?

John W. Vinson[MVP]
 
Hi David,

Not quite. You need to start the macro some other way - e.g. every time
the database's main form opens. You can then have it look up the stored
date (typically using the DLookup() function), compare it with the
present date, and respond accordingly.

Writing VBA code instead of macros gives much more power and
flexibility.

On Fri, 8 Apr 2005 09:05:04 -0700, "David Harwood" <David
 
You mention that code is a better way to get someting done; I agree.

I'm a beginner-intermediate level VBA coder and I need to write an Access
procedure that will run based on a (future) date stored in a linked SQL
table. I am kind of struggling with how/where to begin. Do you (or anyone who
reads this post) have a suggestion on how to accomplish this?

It would be something straightforward like running an UPDATE statement that
sets 2 bit flags and writes a date in a column. The event I use now fires off
On Click of a button, so I was thinking I'd reuse that code in my
basProcedures module, then call it when the date matches or is past Now(). I
think I have the elements identified, it's a matter of putting them
together....... :)

Thanks,

-Aaron
 
Back
Top