bill201
asked on
How can one force to add a value in a inputbox on microsoft access 2013
hi
i have a form in microsoft access that when i press on a button it's opening an iputbox that ask "what is the value ". and i want to force the user to put the value 1 or 2, and if he don't enter it this will show up an msgbox that he must to put a value between 1-2, and when he will press ok the inpubx will show up again like an endless loop, and the user can stop it only when he press on the cancel on the inputbox button
i have a form in microsoft access that when i press on a button it's opening an iputbox that ask "what is the value ". and i want to force the user to put the value 1 or 2, and if he don't enter it this will show up an msgbox that he must to put a value between 1-2, and when he will press ok the inpubx will show up again like an endless loop, and the user can stop it only when he press on the cancel on the inputbox button
dim a as long
a = clng(inpubox("press a value between 1-2")
if not a>0 or not a <3 then
msgbox "you must ot enter a value between 1-2
inputbox again
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER