Hi everyone,
I'm not a VBA expert and this has me stumped.
I am defining an integer, I then use inputbox to get the user defined value.
When this runs, the user enters the value when prompted. Immediately after this the user asked to enter the parameter value for the same integer (shf).
Immediately after this, they are asked for exactly the same parameter value.
Immediately after this, it carries on and does the job.
Any ideas?
Here's the simple code:
If it helps, I have seen that shf is then used twice in the same sub routine but why has it forgotten the value?
I'm not a VBA expert and this has me stumped.
I am defining an integer, I then use inputbox to get the user defined value.
When this runs, the user enters the value when prompted. Immediately after this the user asked to enter the parameter value for the same integer (shf).
Immediately after this, they are asked for exactly the same parameter value.
Immediately after this, it carries on and does the job.
Any ideas?
Here's the simple code:
Code:
Dim x As Integer x = InputBox("Enter minimum shareholders funds in £'000's") If x < 100 Then MsgBox ("x is too low") GoTo 20 End If DoCmd.SetFilter WhereCondition:="[Operator]=[Forms]![user]![User]" & " AND [Status] = ""Data""" & " AND [Desc] Like ""*"" & [Forms]![user]![Keyword] & ""*""" & " AND [VarX] > X"
Comment