Force Data Entry In Combobox First

P

PC Datasheet

I have a form with an unbound combobox at the top and seventeen controls
below it. Is there a simple way to prevent data entry in any of the controls
until a selection is made in the combobox?

Thanks!

Steve
 
R

Ricky Hicks MVP

Just disable all of the controls involved until a valid choice has been made
in the combo ...
Then use the After Update event of the combo with code to loop thru the
control collect and enable the other controls as desired ...

R. Hicks
 
K

Ken Snell

Assuming that the other controls are in the Detail section, just make that
section invisible and set its visibility in the AfterUpdate event of the
combo box (test for a value in the combobox).
 
B

Bob Quintal

I have a form with an unbound combobox at the top and
seventeen controls below it. Is there a simple way to prevent
data entry in any of the controls until a selection is made in
the combobox?

Thanks!

Steve
in the form's current event, set the .enabled property false for
each control. The in the combo box's .afterupdate, set them true.
 
T

Trevor Best

Bob said:
in the form's current event, set the .enabled property false for
each control. The in the combo box's .afterupdate, set them true.

Another way is to use the form's BeforeInsert event and set Cancel=True
if the combo box is null, that's the quicker way to code it but not as
user freindly as Bob's. Depends if you like your users much :)
 
T

tina

trying to plant questions so you can "self advertise" here? and why should
folks posting legitimate questions pay you to solve such simple problems -
when the rest of us will provide help for free?
 
M

Marshall Barton

LOL

Another example of what goes around, comes around.
Or rather more like reaping what you sow.
 
M

Marshall Barton

John, tina

If you're correct, the poster got it backwards.

OTOH, it looks more like someone sticking it back where it
came from.

Either way, it's good for a laugh.
--
 
K

Keith

Marshall Barton said:
John, tina

If you're correct, the poster got it backwards.

OTOH, it looks more like someone sticking it back where it
came from.
Indeed, and I don't believe for one minute that "PC Datasheet" didn't
already know the answer to the question he asked.
 
W

WSF

Very perceptive of you young Marshall.
I figured if it is good enough to advertise in one's responses why not
do so in one's questions!

ah hah hah hah hah hah hah hah hah hah hah haaaaaaaaaah ! hiccup!
 
M

Marshall Barton

While I appreciate the complement WSF, I can not let a
misunderstanding go uncorrected. The word "young" is not an
appropriate description of me, even if it is relative to
your own feelings of decrepitude ;-)
 
L

Larry Linson

While I appreciate the complement WSF,
I can not let a misunderstanding go uncorrected.
The word "young" is not an appropriate
description of me, even if it is relative to
your own feelings of decrepitude ;-)

Gosh, Marsh, I thought "young, handsome, wearing a jaunty beret" was a
perfectly apt description. Of course, my POV on age may from some here.
<GRIN>

Larry
 
W

WSF

I fear the physical decrepitude may be on me soon enough but the mental,
no! There but for a sense of humour go we all.
WSF
 
M

Marshall Barton

I think both Larry amd I are in total aggreement with your
sentiments.

Keep on truck'n
 
Top