123dstreet
Registered User.
- Local time
- Today, 06:19
- Joined
- Apr 14, 2010
- Messages
- 122
Hi all! I'm having a minor problem.. in my form, I hit the "Update" button(code below) and it works fine, but if the taxes field is Null (there are no taxes) the Total does not save when I exit the form. It does, however, when there is taxes. I just don't want my users to have to hit the update button everytime they open the form as it may cause problems. I'm sure its something simple but any help would be appreciated! thanks so much
Code:
Private Sub updateb_Click()
On Error GoTo Err_updateb_Click
[STotal] = [Order Details Subform].[Form]![SubTotal]
[Total] = [Freight] + [STotal] + Nz([Taxes])
[Balance] = [Total] - [Payment]
DoCmd.RunCommand acCmdRefresh
Exit_updateb_Click:
Exit Sub
Err_updateb_Click:
MsgBox Err.Description
Resume Exit_updateb_Click
End Sub