G
Guest
Ok, I have some code that is going off no matter what number is being
inputted and i have no idea why.
AU is a double defined earlier in the code.
The part that is going off every time is:
ElseIf AU > (Me![Order Amount] - Nz(Me![Amount Received], 0)) Then
MsgBox ("You Have Entered " & AU & " Items Received Yet Only " &
(Me![Order Amount] - Nz(Me![Amount Received], 0)) & " Was Expected!")
For example: AU is 0 via the inputbox, [Order Amount] is 1, [Amount
Received] is null
Then it should read: elseif 0 > (1-0) then ....
I have verified that the numbers are correct yet it is going here
everytime and never skipping it.
Can anyone tell me what I am doing wrong here?
--------------------------------------------------------------------------------------
AU = InputBox("Enter The Partial Amount Received!", "Partial Amount
Received!")
If IsNull(AU) Or AU = "" Then
Exit Sub
ElseIf AU > (Me![Order Amount] - Nz(Me![Amount Received], 0)) Then
MsgBox ("You Have Entered " & AU & " Items Received Yet Only " &
(Me![Order Amount] - Nz(Me![Amount Received], 0)) & " Was Expected!")
Exit Sub
Else
'bulk of code here
End If
inputted and i have no idea why.
AU is a double defined earlier in the code.
The part that is going off every time is:
ElseIf AU > (Me![Order Amount] - Nz(Me![Amount Received], 0)) Then
MsgBox ("You Have Entered " & AU & " Items Received Yet Only " &
(Me![Order Amount] - Nz(Me![Amount Received], 0)) & " Was Expected!")
For example: AU is 0 via the inputbox, [Order Amount] is 1, [Amount
Received] is null
Then it should read: elseif 0 > (1-0) then ....
I have verified that the numbers are correct yet it is going here
everytime and never skipping it.
Can anyone tell me what I am doing wrong here?
--------------------------------------------------------------------------------------
AU = InputBox("Enter The Partial Amount Received!", "Partial Amount
Received!")
If IsNull(AU) Or AU = "" Then
Exit Sub
ElseIf AU > (Me![Order Amount] - Nz(Me![Amount Received], 0)) Then
MsgBox ("You Have Entered " & AU & " Items Received Yet Only " &
(Me![Order Amount] - Nz(Me![Amount Received], 0)) & " Was Expected!")
Exit Sub
Else
'bulk of code here
End If