check box in a form

  • Follow


I am new to Access.  On my form,
I created a formula to calculate Total Due...
=([DailyRate]*[NumberDays]+75)*1.08

Now, I want to add a check box to the form.  If the user checks the box 
(True), I want 100 added to the Total Due.  If the box isn't checked, then 
the Total Due doesn't change.

I tried an IF statement, but didn't have luck.

Thanks...
0
Reply Utf 10/18/2007 5:20:01 AM

In the check box's AFTER UPDATE event put

If Me.YourCheckboxNameHere Then
   Me.[Total Due] =(([DailyRate]*[NumberDays]+75)*1.08)+100
Else
   Me.[Total Due] =([DailyRate]*[NumberDays]+75)*1.08
End If

-- 
Bob Larson
Access World Forums Super Moderator
____________________________________
Access 2000, 2003, 2007, SQL Server 2000, Crystal Reports 10/XI, VB6
WinXP, Vista


"rkolinsky" wrote:

> I am new to Access.  On my form,
> I created a formula to calculate Total Due...
> =([DailyRate]*[NumberDays]+75)*1.08
> 
> Now, I want to add a check box to the form.  If the user checks the box 
> (True), I want 100 added to the Total Due.  If the box isn't checked, then 
> the Total Due doesn't change.
> 
> I tried an IF statement, but didn't have luck.
> 
> Thanks...
0
Reply Utf 10/18/2007 5:48:00 AM

1 Replies
216 Views

(page loaded in 0.347 seconds)

Similiar Articles:
















7/22/2012 3:56:33 PM


Reply: