Edit Button

M

mmarrero

I have a form that when you open it all the fields are grey and read only. I would like to change the background to white when they click on the Edit Button. Kind of like Read Only background Grey and when you click on edit or new background white.
 
K

Kevin Sprinkel

It sounds like all of these controls are disabled, i.e.,
their Enabled property is set to False.

To enable a specific control, say, called txtCustomer,

Me.txtCustomer.Enabled = True

Or, to enable all input controls (of the types listed):

For Each ctl In Me.Controls
' Exclude labels, lines, other non-input controls
If (ctl.ControlType = acComboBox Or _
ctl.ControlType = acTextBox Or _
ctl.ControlType = acOptionGroup) Then
ctl.Enabled = True
End If
Next ctl

HTH
Kevin Sprinkel
-----Original Message-----
I have a form that when you open it all the fields are
grey and read only. I would like to change the background
to white when they click on the Edit Button. Kind of like
Read Only background Grey and when you click on edit or
new background white.
 

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