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.
Peter Proost - 07 Dec 2005 12:15 GMT
You could for example only do a lookup when the user hits enter and not
everytime when the textbox is validated.
Hth Greetz Peter
--
Programming today is a race between software engineers striving to build
bigger and better idiot-proof programs, and the Universe trying to produce
bigger and better idiots. So far, the Universe is winning. (Rich Cook)
> Hi,
>
[quoted text clipped - 17 lines]
>
> Henk The Netherlands.
Cor Ligthert [MVP] - 07 Dec 2005 16:29 GMT
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