S
Steven Cheng
I have written the following code for a textbox control:
Private Sub curFood_AfterUpdate()
allupdates1
allupdates2
End Sub
Private Sub allupdates1()
[curSubtotal].Value = [curFood].Value +
[curBeverage].Value + [curNewsPaper].Value +
[curParking].Value + [curSundry].Value
If bolChargeonGST = True Then
[curGST].Value = Round(([curSubtotal].Value +
[curGrats].Value) * 0.07, 2)
Else
[curGST].Value = Round([curSubtotal].Value *
0.07, 2)
End If
End Sub
Private Sub allupdates2()
[curPST_Retail].Value = Round(([curSundry].Value +
[curNewsPaper].Value) * 0.075, 2)
[curPST_Liquor].Value = Round([curBeverage].Value *
0.1, 2)
[curTotal].Value = [curSubtotal].Value +
[curGST].Value + [curPST_Retail].Value +
[curPST_Liquor].Value + [curGrats].Value
End Sub
All of the controls are bound to a table and have been
declared in the control source property. But the
following error message keeps poping up when I press
enter and/or change focus on this/these controls:
The expression After Update you entered as the evnt
property setting produced the following error: Procedure
declaration does not match description of event or
prcedure having the same name.
* the expression may not result in the name of the macro,
the name of a user-defined function or [Event Procedure],
* There may have been an error evaluating the function,
event, or macro.
I have tried changing the locking on the control and even
redoing the control. I have added the value property
just in case that this is the problem, but I don't think
it would matter as the default property for these
controls are value, right?
Can someone let me know.
Private Sub curFood_AfterUpdate()
allupdates1
allupdates2
End Sub
Private Sub allupdates1()
[curSubtotal].Value = [curFood].Value +
[curBeverage].Value + [curNewsPaper].Value +
[curParking].Value + [curSundry].Value
If bolChargeonGST = True Then
[curGST].Value = Round(([curSubtotal].Value +
[curGrats].Value) * 0.07, 2)
Else
[curGST].Value = Round([curSubtotal].Value *
0.07, 2)
End If
End Sub
Private Sub allupdates2()
[curPST_Retail].Value = Round(([curSundry].Value +
[curNewsPaper].Value) * 0.075, 2)
[curPST_Liquor].Value = Round([curBeverage].Value *
0.1, 2)
[curTotal].Value = [curSubtotal].Value +
[curGST].Value + [curPST_Retail].Value +
[curPST_Liquor].Value + [curGrats].Value
End Sub
All of the controls are bound to a table and have been
declared in the control source property. But the
following error message keeps poping up when I press
enter and/or change focus on this/these controls:
The expression After Update you entered as the evnt
property setting produced the following error: Procedure
declaration does not match description of event or
prcedure having the same name.
* the expression may not result in the name of the macro,
the name of a user-defined function or [Event Procedure],
* There may have been an error evaluating the function,
event, or macro.
I have tried changing the locking on the control and even
redoing the control. I have added the value property
just in case that this is the problem, but I don't think
it would matter as the default property for these
controls are value, right?
Can someone let me know.