Hi guys
I have a piece of code that words out an area of land that is available to build on from its full value, using the following code:
Private Sub DT_PERCENT_AfterUpdate()
Dim fMultiply As Integer
If SITE_AREA_FY > 0 And DT_PERCENT > 0 Then
fMultiply = SITE_AREA_FY * DT_PERCENT
NEW_SITE_AREA = fMultiply
Else
End If
End Sub
So for example, if the SITE_AREA_FY is 5 acres and the DT_PERCENT is 50% then NEW_SITE_AREA should equal 2.5.
However, error 2447 'there is an invalid use of the . (dot) or ! operator or invalid parentheses' keeps popping up and I don't know why. The line in red is the 'invalid' code line.
Only thing I thought of was that DT_PERCENT (which gets pulled from a different table) is formatted as a percent. I tried changing it, but it still does the same error. Also, NEW_SITE_AREA is a unbound field because of it being a calculated field so I am not sure if it is that either.
I hope someone can help me, I would very much appreciate it!
I have a piece of code that words out an area of land that is available to build on from its full value, using the following code:
Private Sub DT_PERCENT_AfterUpdate()
Dim fMultiply As Integer
If SITE_AREA_FY > 0 And DT_PERCENT > 0 Then
fMultiply = SITE_AREA_FY * DT_PERCENT
NEW_SITE_AREA = fMultiply
Else
End If
End Sub
So for example, if the SITE_AREA_FY is 5 acres and the DT_PERCENT is 50% then NEW_SITE_AREA should equal 2.5.
However, error 2447 'there is an invalid use of the . (dot) or ! operator or invalid parentheses' keeps popping up and I don't know why. The line in red is the 'invalid' code line.
Only thing I thought of was that DT_PERCENT (which gets pulled from a different table) is formatted as a percent. I tried changing it, but it still does the same error. Also, NEW_SITE_AREA is a unbound field because of it being a calculated field so I am not sure if it is that either.
I hope someone can help me, I would very much appreciate it!