Force User to Enter Data.

J

jfaz

I am new to Access and would really appreciate some help.

I have a form with two check boxes [GEIsol] and [DPIsol]. I want to put some
code behind the [GeIsol] to only allow the box to be ticked if [DPIsol] is
yes.
I am completely at a loss as to how to do this and any help would be most
welcome.
I thank you for your help in advance.
 
K

Klatuu

Actually, the code would go in the After Update event of [DPIsol]. It would
be

If Me.[DPIsol] = True Then
Me.[GeIsol].Enabled = True
Else
Me.[GeIsol].Enabled = False
End If

Or, more consisely:

Me.[GeIsol].Enabled = Me.[DPIsol]

It also need to go in the form Current event so it will set the control to
the correct state for the current record.
 
J

jfaz

~Thanks. However, I cant find the current event - could you point me in the
right direction please
 
K

Klatuu

With your form in design view, open the Properties dialog box and be sure it
is showing the properties for the form. Select the Events tab. You will
find it there.
--
Dave Hargis, Microsoft Access MVP


jfaz said:
~Thanks. However, I cant find the current event - could you point me in the
right direction please

jfaz said:
I am new to Access and would really appreciate some help.

I have a form with two check boxes [GEIsol] and [DPIsol]. I want to put some
code behind the [GeIsol] to only allow the box to be ticked if [DPIsol] is
yes.
I am completely at a loss as to how to do this and any help would be most
welcome.
I thank you for your help in advance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top