calculation for default value

mu

Registered User.
Local time
Today, 21:56
Joined
May 22, 2002
Messages
18
I am working on a form that will allow me to enter purchase invoices, to speed up data entry i have been trying to get the defaultvalue of the VAT field to show the sum of a calculation, the calculation is the invoicenett field x 17.5%, The reason i want it to be the defaultvalue that shows the sum is on some invoices the vat amount is calculated differently and can be different,
The invoicenett field value is entered immediately before the tab stops at the VAT field.
Hope someone can help.
Thanks
 
Can you give me any idea as to what code I should write at the oncurrent, i have tried a few ideas but have not had any success

Thanks.
 
Don't use OnCurrent, instead use AfterUpdate of the invoicenett field.

Code:
Private Sub invoicenett_AfterUpdate()
    If IsNull(Me.VATField) Then Me.VATField = Me.invoicenett * .175
End Sub

[This message has been edited by David R (edited 05-28-2002).]
 

Users who are viewing this thread

Back
Top Bottom