Button_Leave event problem.

  • Thread starter Thread starter henk
  • Start date Start date
H

henk

Hi,

On my form I have one textbox and one lookup button.
If you click the lookup button you can choose eg Red, Blue, Yellow from
a datagrid.
The one you choose will be filled in the textbox.
The other possibility is to type "Yellow" in the textbox.
Both is vallid.
A third possibility is to type the beginning of, in this case, a color.
If the user now clicks on the lookup button, only the colors that match
the beginning string in the textbox will be shown.

The problem I have in this case is that:
-If the user types a color in the textbox and leave the textbox, the
color will be checked and if wrong, a message will be shown. But if the
user types eg "Yel" and leaves the textbox and clicks the
lookupbutton, I don't want to show this message.

Thanks in advance,

Henk The Netherlands.
 
You could for example only do a lookup when the user hits enter and not
everytime when the textbox is validated.

Hth Greetz Peter
 
Henk,

Can you rephrase it. I think that either Peter nor I understand what you
want.

By instance what do you mean with " But if the
user types eg "Yel" and leaves the textbox and clicks the
lookupbutton". (I assume that the lookupbutton is a normal button?)

Is it something as "if the focus is on the textbox and the button is
clicked".

Maybe it seems the same however it is a big difference.

So please rephrase it a little bit and only the essential facts, by instance
if the validating is done in the validating event or in the leave event.

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top