Re: Allow routine to finish when called multiple times

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



"Arvin Meyer [MVP]" <a@xxxxx> wrote in
news:ex4QIDj5HHA.4880@xxxxxxxxxxxxxxxxxxxx:

The advantage to do it this way is that it provides positive
feedback to the user. He/she soon learns not to even try to click
the button continuously.

This is a key UI principle: don't allow the user to do what the user
should not be allowed to do. I hate clicking a button and having a
message pop up saying "you can't do that now", because I shouldn't
have been able to click that button in the first place!

If, for instance, you have a dialog form that's collecting criteria
for some purpose, the OK button should not be enabled until all the
controls on the form have been populated by the user. I usually do
this by writing a function that checks all the fields for valid
values, and then assigning that function to the AfterUpdate event of
all the controls (you can do it in one step by selecting them all at
once). All that function does is something like this:

Me!cmbOK.Enabled = Not Isnull(Me!txt1 + Me!txt2 + Me!txt3)

Any other type of control ought to have a default value (checkboxes,
option groups), and for any control that has an obvious value (like
a date range) you should prepopulate to make it as easy as possible
for the end user. If you prepopulate everything, then you should
have the OK button enabled by default, but still use the function
above, in case the user deletes a value from one of the fields.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
.


Quantcast