I have a table called users and a field in that table called amountauthorize d.
My users enter a figure in a text box called estp on a form. estp is either equal to or less than the amountauthorize d.
I want the code to check the figure in estp and compare it to amountauthorize d in the table and if the figure in estp is greater than amountauthorize d 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
NOTE:
text33 is another user field in the form and is the same as UserName field in the table.
Thank you
My users enter a figure in a text box called estp on a form. estp is either equal to or less than the amountauthorize d.
I want the code to check the figure in estp and compare it to amountauthorize d in the table and if the figure in estp is greater than amountauthorize d 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
Code:
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
Comment