473,385 Members | 1,863 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Button_Leave event problem.

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.

Dec 7 '05 #1
2 909
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)

"henk" <ri*******@hotmail.com> schreef in bericht
news:11**********************@g14g2000cwa.googlegr oups.com...
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.

Dec 7 '05 #2
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
Dec 7 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Andy Read | last post by:
Hello all, I have the requirement to produce source code that produces an object hierarchy. Example: Root | Folder 1
13
by: Manuel Lopez | last post by:
I have a puzzling form timer problem that I didn't experience prior to Access 2003 (though I'm not sure access 2003 is to blame). Here's the situation: a computer has two access 2003 databases on...
6
by: Michael Johnson Jr. | last post by:
I am trying to handle a button click event, which updates a web control table with data. The button is dynamically created in the table itself. When I call updateTable() in the Page_Load the new...
4
by: The Alchemist | last post by:
I am having a problem with a dynamically-generated Datagrid. It is important to point out that this problem does not exist with a design-time created Datagrid, but only with a dynamically generated...
9
by: Marcelo Cabrera | last post by:
Hi, I have a user control that in turn creates a bunch of webcontrols dynamically and handles the events these webcontrols raise. It used to work fine on ASP .Net 1.1 but when compiled on 2.0 it...
9
by: jeff | last post by:
New VB user...developer... Situation...simplified... - I want to wrap a pre and post event around a system generated where the pre-event will always execute before the system event and the...
6
by: hemant.singh | last post by:
Hi all, I am trying to get a way by which I'll know exactly when user goes out of my site by clicking on close button in browser, So that w/e user click close button in browser, I can send a...
14
by: Snor | last post by:
I'm attempting to create a lobby & game server for a multiplayer game, and have hit a problem early on with the server design. I am stuck between using a threaded server, and using an event driven...
2
by: cty0000 | last post by:
Please anybody help me... I have some serious problem.. I'm doing to keep equpiment list(string).. In my code, there are 3 page which are having 4 equpiment ID (user control.) like this...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.