I have the following code to auto fill a form when is loaded as it reads the latest correct values from a table
So far so good, however the SmartPension value is a deduction therefore in the form it should load with the minus - sign prior to the value.
Is this possible?
I have a calculated field on the form which I subtract the SmartPension value and is fine, but I would like to display it (e.g. Smart Pension - £ 100.00) on the form for more clarity.
Code:
Private Sub Form_Load()
SalaryAnnual.DefaultValue = """" & DLookup("SalaryAnnual", "tblSalary") & """"
SalaryBasicPay.DefaultValue = """" & DLookup("SalaryBasic", "tblSalary") & """"
SmartPension.DefaultValue = """" & DLookup("EmployeePensionContributions", "tblSalary") & """"
OPEmployerPension.DefaultValue = """" & DLookup("TotPensionContributions", "tblSalary") & """"
End Sub
So far so good, however the SmartPension value is a deduction therefore in the form it should load with the minus - sign prior to the value.
Is this possible?
I have a calculated field on the form which I subtract the SmartPension value and is fine, but I would like to display it (e.g. Smart Pension - £ 100.00) on the form for more clarity.