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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Auto Message

Status
Not open for further replies.

Helensp

Technical User
Jun 23, 2003
1
US
I have a problem on how to prevent people to enter one number before they enter other information.

For example, A1 is car number, A2 is the price. I want people enter car number first. But I don't know whether there are some auto macro can let me do that. That means, if people try to enter number to A2 first, there will be a message box shows "Please enter car number first."

Can somebody help me?

Thank you!
 
why not disable a2 until there is data in a1..then enable a2
set focus to a1 this way if a2 is disabled they cannot enter data into that field.

 
You can set taborder property for the :
txtCarNumber textbox - 0
txtCarPrice textbox - 1
and write the code in txtCarNumber validate event:
if len(trim(txtCarNumber.text))= 0 then
msgbox "Car Number Should be entered"
txtCarNumber.setfocus
exit sub
end if

or write the same code in txtCarPrice gotfocus event
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top