Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MsgBox popup that needs user imput

Status
Not open for further replies.

ksgirl2

Programmer
Jul 19, 2002
45
US
hello,

I need to create a message box that asks the user for a text string before a form is opened. This text string will have to match another one (password) before the form will open. If the wrong password is entered i need a message box to pop up and say "wrong password" and have an ok button on it to close it. What is the code to create this on an event procedure On Load?

Thanks in Advance!

Marie
 
I'm still not understanding how to use the input box function. Thanks for the tip. Any other suggestions?

m
 
try this
dim strinput as string

strinput = inputbox ("please enter password")

if strinput = (password) then
docmd.openform "nameofyourform",acnormal
else
msgbox "wrong password, try again"
end if
you'll have to substitute your password into the (password) area, probably best to use a variable. Im sure you will get the idea. Post back if you need further help. Later.
 
WORKS LIKE A CHARM! Thanks! That's just what i was looking for!
:)
marie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top