Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding to a default value 1

Status
Not open for further replies.

WallT

Vendor
Aug 13, 2002
247
US
I have a form where I use an If statement. It basically goes like this:

Private Sub AttorneyFileNumber_AfterUpdate()
If Me.AttorneyFileNumber & "" = "ES" Then
Me!Fee = "15.00"
Else
Me!Fee = "12.00"
End If
End Sub

On the same form I have a check box called "RUSH", that when it is checked (True) I want it to add $5.00 to the "Fee" field. What is the easiest way to do this?
 
BigDav,

Have you tried in your if statement...

Me!Fee = Me!Fee + 5

If your Fee field is a text value then
Val(Me!Fee) = Val(Me!Fee) + 5

Binky ::)
><>
 
That worked great, thank you for your help.
 
Now that I am playing around with this, I am realizing that I need something more. If users change the AttorneyFileNumber, then it changes the Fee and cancels out the (+ 5), but the &quot;Rush&quot; check box is still checked. I can't count on them going back to the Rush check Box and re-doing it. Is there a better sollution to what I am trying to accomplish...

All &quot;AttorneyFileNumber&quot;s are billed $12.00 under my &quot;Fee&quot; field. Exception, if the &quot;AttorneyFileNumber&quot; is &quot;ES&quot; (Which is a particular client) then they are billed $15.00. One more exception...if any order is a &quot;Rush&quot; (Rush is a check box) then you add $5.00 to the order (&quot;Fee&quot; field). I am almost done, and in critical need of some advise here.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top