From: John W. Vinson on
On Thu, 3 Sep 2009 05:31:56 -0700 (PDT), johnlute <jlute(a)marzetti.com> wrote:

>I have and Exit Event that forces a selection to be made in a
>combobox:
>

What provision do you have (or do you need one!) for a user opening the form,
working with other controls, and never setting focus to the combo box AT ALL?
--

John W. Vinson [MVP]
From: Linq Adams via AccessMonster.com on
John raised the really important point here, I think! You ***never*** should
attach validation code intended to insure that a control actually has data to
any event connected to the control, for the reason he gave! You can't be sure
that the user will ever actually enter the control! This type of validation
should always be done elsewhere, usually in the Form_BeforeUpdate event, or
if this form were unbound, in the click event of the button that runs the
query.

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via http://www.accessmonster.com

From: johnlute on
Hi, John.

The form is very simple. It only has 5 controls and when it opens the
cursor is in cbFacility by virtue of it being first in the tab order.

The Exit Event is simply to assure that a selection is made. Maybe
this isn't the "best" way of doing it however I was just trying to
keep things simple.

It never occurred to me that this would be a problem should a user
change their mind and wish to cancel without running the query however
this is a desireable action now.

On Sep 3, 4:12 pm, John W. Vinson <jvinson(a)STOP_SPAM.WysardOfInfo.com>
wrote:
> On Thu, 3 Sep 2009 05:31:56 -0700 (PDT), johnlute <jl...(a)marzetti.com> wrote:
> >I have and Exit Event that forces a selection to be made in a
> >combobox:
>
> What provision do you have (or do you need one!) for a user opening the form,
> working with other controls, and never setting focus to the combo box AT ALL?
> --
>
>              John W. Vinson [MVP]