PC Review


Reply
Thread Tools Rate Thread

CheckBox Calculation

 
 
=?Utf-8?B?Q2Fsdmlu?=
Guest
Posts: n/a
 
      29th Oct 2007
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

 
Reply With Quote
 
 
 
 
Al Campagna
Guest
Posts: n/a
 
      29th Oct 2007
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."


"Calvin" <(E-Mail Removed)> wrote in message
news:E8F65E01-160E-4AEB-A455-(E-Mail Removed)...
>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
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
True/False calculation converted to checkbox? BlueWolverine Microsoft Access Forms 3 8th Dec 2008 07:51 PM
perform a calculation if checkbox marked vjaggers Microsoft Excel Worksheet Functions 0 5th Jun 2008 03:24 PM
checkbox calculation =?Utf-8?B?Um9iYjI3?= Microsoft Excel Programming 2 21st Nov 2006 11:00 PM
Textbox calculation based on checkbox =?Utf-8?B?Unlhbg==?= Microsoft Access 3 21st Nov 2005 11:57 PM
Master-Detail Datagrid -checkbox (once tick the checkbox, all the child checkbox is ticked) Agnes Microsoft VB .NET 0 16th Aug 2004 11:23 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:07 PM.