Disabling Fields on a form

  • Thread starter Thread starter Charles Phillips
  • Start date Start date
C

Charles Phillips

Hello,
I am using MS-Access 97.
I have a form with six (6) fields I need to disable, when a specific
selection is made from a combo box.
The 6 fields to be disabled are:
Router Shipped, Router Shipped Date, Router Received, Follow-up Date, Router
Cut-Over Scheduled, Router Complete.
The combo box has six (6) selections, which are:
Direct TV, Nove Available, Ordered, Not Ordered, Moving, & Satellite
I want to be able to choose a selection from the combo box, to diable the
mentioned fields on the form, for ANY particular User in the form.
Can someone tell me how to do this???


Charles L. Phillips
 
Charles Phillips said:
Hello,
I am using MS-Access 97.
I have a form with six (6) fields I need to disable, when a specific
selection is made from a combo box.
The 6 fields to be disabled are:
Router Shipped, Router Shipped Date, Router Received, Follow-up Date, Router
Cut-Over Scheduled, Router Complete.
The combo box has six (6) selections, which are:
Direct TV, Nove Available, Ordered, Not Ordered, Moving, & Satellite
I want to be able to choose a selection from the combo box, to diable the
mentioned fields on the form, for ANY particular User in the form.
Can someone tell me how to do this???


Charles L. Phillips
Hi Charles

You need to check the value of the combo box after the selection is made and
if the specific selection is made, disable the controls. Check the combo box
selection in the after update event of the combo.
Something like:

Private Sub cboMyCombo_AfterUpdate()
if cboMyCombo = "Direct TV" then
Router_Shipped.Enabled = False
Router_Shipped_Date.Enabled = False
'disable the other 4
else
Router_Shipped.Enabled = True
Router_Shipped_Date.Enabled = True
'enable the other 4
end if
End Sub

Replace cboMyCombo and Router_Shipped with the actual names of the controls
on your form.

I'm not sure what you mean by "for ANY particular User in the form".

Regards - Joe
 
Back
Top