Thread: Greyout Fields
View Single Post
  #4  
Old May 10th, 2004, 07:01 PM
Byron
external usenet poster
 
Posts: n/a
Default Greyout Fields

Bruce,

Oops, of course you are correct. Just a slip up.

Sorry.

By the way, great explantion.

Byron

-----Original Message-----
Am I missing something here, or should that part about
hiding the control be Visible = False?
To John, to add code to an event, double click the

control
in Design View (or right click Properties if the form

is
already selected). Click the Event tab, then click next
to After Update (it is After Update in this case, but
there are many places to put an event, depending on your
needs). Click the three dots, click Code Builder, click
OK, then enter the suggested code between the lines that
read "Private Sub ..." and "End Sub". Save, then go

back
to your form and give it a try.
-----Original Message-----
John,

We've all had that "first time."

I will assume that when you speak of a "tick" in

another
field, that you are using either a checkbox or an

option
button. In either case, you will need some code added

to
the "AfterUpdate" event of your checkbox or option

button
or, for that matter, what ever control you are using.

The "grey out" is refered to as disabled. So the

control
is either enabled or disabled.

The code would be like:

to disable the control use:
Me.TheNameOfTheControlToBeDisabled.Enabled = False

to hide the control use:
Me.TheNameOfTheControlToBeDisabled.Enabled = True

HTH

Byron
-----Original Message-----
Hello,
I am trying to create database for the first time,

and
one of the things I need it to do is to hide or

geayout
some of the fields dependant on a tick being places in
anouther field.
Dose anybody know how this can be done ???

If so Please Help

Thanks
John

.

.

.