My users enter a figure in a text box called estp on a form. estp is either equal to or less than the amountauthorized.
I want the code to check the figure in estp and compare it to amountauthorized in the table and if the figure in estp is greater than amountauthorized display message "Figure over authorized limit".
The following is the code I have written but I keep getting expression expected error .
I am new to vba and would appreciate your help and guidance with this
Expand|Select|Wrap|Line Numbers
- Dim x As String
- x => (estp)
- x = DLookup("amountauthorized", "Users", "UserName = test")
- If (estp) < 200 And text33 = "test" Then
- MsgBox "Amount Over approval limit"
- End Sub
text33 is another user field in the form and is the same as UserName field in the table.
Thank you