Update a check box if a date has past

  • Thread starter Dave Rockfanatic via AccessMonster.com
  • Start date
D

Dave Rockfanatic via AccessMonster.com

Hello Gurus,
I am creating a database that records the date an asset was last calibrated and then calculates the next Calibration date using the Dateadd function. What I would like is for a checkbox to display a tick if the next calibration date has passed.


The New calibration date is in: [NewCalDate] Column and the check box is in the [IsCalInDate] Column


Any help would be appreciated as I have looked through a few sites now and had no luck.

Yours Truly David
 
J

Joseph Meehan

Dave said:
Hello Gurus,
I am creating a database that records the date an asset was last
calibrated and then calculates the next Calibration date using the
Dateadd function. What I would like is for a checkbox to display a
tick if the next calibration date has passed.


The New calibration date is in: [NewCalDate] Column and the check box
is in the [IsCalInDate] Column


Any help would be appreciated as I have looked through a few sites
now and had no luck.

Yours Truly David

That sound not be very hard to code in VBA. What event do you want to
trigger the update???
 
D

Dave Rockfanatic via AccessMonster.com

I want the NewCalDate if less than todays date to check the check box.

in laymans terms I have a Torque Wrench that was Calibrated on the 10/01/2004 the new Calibration is on the 10/01/2004 if twelve months are added. I As today is the 16/01/2005 I know it is out of date but require the Check box to automaticly check.
 
D

Dave Rockfanatic via AccessMonster.com

Opps Wrong Date above

I want the NewCalDate if less than todays date to check the check box.

in laymans terms I have a Torque Wrench that was Calibrated on the 10/01/2004 the new Calibration is on the 10/01/2005 if twelve months are added. I As today is the 16/01/2005 I know it is out of date but require the Check box to automaticly check.
 
J

Joseph Meehan

Dave said:
I want the NewCalDate if less than todays date to check the check box.

in laymans terms I have a Torque Wrench that was Calibrated on the
10/01/2004 the new Calibration is on the 10/01/2004 if twelve months
are added. I As today is the 16/01/2005 I know it is out of date but
require the Check box to automaticly check.

Dave,

The question is when do you want Access to check and make the change.
Access needs to have some sort of trigger to cause it to perform the action.
Maybe each time you open the database, maybe when you look at that specific
record in a specific form or when you make some sort of change in that
record, maybe when you click a button. If you don't want every record
changed then the event needs to be something that will identify that
specific record or group of records. You may also want to add a opportunity
to make the change or not make the change by Access asking the user if they
want to change the current record or change 32 records etc.
 
D

Dave Rockfanatic via AccessMonster.com

Hi Joseph,
Okay I seem to have got the wrong end of the term trigger.

I would like the trigger to be everytime the database opens.
 
J

Joseph Meehan

Dave said:
Hi Joseph,
Okay I seem to have got the wrong end of the term trigger.

I would like the trigger to be everytime the database opens.

How about setting up an update query that will find all the records you
want to check and will check them. That is it will look for all records
with the last date calibrated greater than X days from Now(). and the
action to set the checkbox filed to negative 1. I can't remember the
easiest way to trigger an update query on open, but it should not be too
hard. Do you think you can get the query working?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top