Hi, I have created this macro to calculate form fields and store the value in the relvant table.
My form consists of 1 form and 1 sub form. The Marco currently runs in the subform and works when opening the subform only. It sotes the data as planned and into the right table.
The fields are Rate of Pay * Hours Worked + Mileage Claim to give me a Total Claim.
The values I have in the macro are
Item: [Total Claim]
Expression: CCur([Rate of Pay]*[Hours Worked])+[Forms]![Table2 subform]![Mileage Claim]
I have the macro saved in the OnCurrent event of the subform and also in the AfterUpdate events in teh Rate of Pay, Hours Worked and Mileage Claim fields in the sub form.
But when I open my main form up, I get the error...
"Microsoft Office Access can't find the form 'Table2 subform' referred to in a macro expression or VB code"
My main form contains 2 fields Staff Code and Surname, the subform then allows me to enter hours worked, total claim etc... multiple times into the subform. Like an employess working times etc...
Any one know what I need to change to get this to run correctly?
Thanks
Will
My form consists of 1 form and 1 sub form. The Marco currently runs in the subform and works when opening the subform only. It sotes the data as planned and into the right table.
The fields are Rate of Pay * Hours Worked + Mileage Claim to give me a Total Claim.
The values I have in the macro are
Item: [Total Claim]
Expression: CCur([Rate of Pay]*[Hours Worked])+[Forms]![Table2 subform]![Mileage Claim]
I have the macro saved in the OnCurrent event of the subform and also in the AfterUpdate events in teh Rate of Pay, Hours Worked and Mileage Claim fields in the sub form.
But when I open my main form up, I get the error...
"Microsoft Office Access can't find the form 'Table2 subform' referred to in a macro expression or VB code"
My main form contains 2 fields Staff Code and Surname, the subform then allows me to enter hours worked, total claim etc... multiple times into the subform. Like an employess working times etc...
Any one know what I need to change to get this to run correctly?
Thanks
Will