CheckBox Calculation

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

Guest

I have a check box on a table. When I click it I want it to perform a
calculation plugging in a new service date.

I want to basically auto calculate after a task is completed and plug that
value into the table. can you please help me in a good direction or approach
to conquer this task.

-Calvin

thank you
 
Calvin,
First, if you're editing or entering data directly into your table...
that should be avoided. That's what forms are for.
A table has no events, like a check box AfterUpdate event, on which to
trigger your code.

Setting a checkbox to True on a form, would fire the AfterUpdate event,
and your code to calculate the ServiceDate would run there.

If MyCheck = True Then
ServiceDate = 'your calc here
Else
'whatever you might do for a false...
End If

But, that calculation, which I assume, is calculated from stored table
data, should probably not be a saved table value. As a general rule, don't
store calculated values in a table that can be "re-derived", or calculated,
"on the fly", in any subsequent form, query, or report... from data you
already have
Better to use an unbound calculated field to always display the
calculated ServiceDate, on your form or report.
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html
"Find a job that you love... and you'll never work a day in your life."
 

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

Back
Top