Geordie2008
Registered User.
- Local time
- Today, 23:24
- Joined
- Mar 25, 2008
- Messages
- 177
Morning all,
I have the following VBA to set a value in a form based on the calculation of two other variables within the form.
Sub Test1()
SetValue
Item: [Total FTE]
Expression: ([Permanent Staff FTE] +[Temporary Staff FTE])
End Sub
(I used the microsoft help paegs to derive this code.)
I then have sub's that call this function when the form is opened or either of the variables are updated:
Sub Form_Current()
Call Test1
End Sub
Private Sub Permanent_Staff_FTE_AfterUpdate()
Call Test1
End Sub
Private Sub Temporary_Staff_FTE_AfterUpdate()
Call Test1
End Sub
None of this is working... It falls over at the "SetValue" (second line!) of code!
Can anyone let me know where im going wrong.... I have all of this code stored in the actual form itself. (Not a public Module)
Thanks,
Mandy
I have the following VBA to set a value in a form based on the calculation of two other variables within the form.
Sub Test1()
SetValue
Item: [Total FTE]
Expression: ([Permanent Staff FTE] +[Temporary Staff FTE])
End Sub
(I used the microsoft help paegs to derive this code.)
I then have sub's that call this function when the form is opened or either of the variables are updated:
Sub Form_Current()
Call Test1
End Sub
Private Sub Permanent_Staff_FTE_AfterUpdate()
Call Test1
End Sub
Private Sub Temporary_Staff_FTE_AfterUpdate()
Call Test1
End Sub
None of this is working... It falls over at the "SetValue" (second line!) of code!
Can anyone let me know where im going wrong.... I have all of this code stored in the actual form itself. (Not a public Module)
Thanks,
Mandy