Disable controls on one record (row) of a continuous form

  • Thread starter Thread starter Billp
  • Start date Start date
B

Billp

I have a subform in a main form.
Parent child relationship (one to many).
The subform is a continuous form with a number of fields and a check box.
I wish to be able to disable on row when the check box is ticked on that row
only.

I have tried.

If Me![Has_Left] = True Then

Me![LastName].Enabled = False
Me![FirstName].Enabled = False
Me![Title].Enabled = False
Me![ContactName] = False
Me![WorkPhone].Enabled = False
Me![WorkExtension].Enabled = False
Me![WorkDDI].Enabled = False
Me![MobilePhone].Enabled = False
Me![FaxNumber] = False
Me![EmailName] = False
Me![Goto_Button].Enabled = False


Else
Me![LastName].Enabled = True
Me![FirstName].Enabled = True
Me![Title].Enabled = True
Me![ContactName] = True
Me![WorkPhone].Enabled = True
Me![WorkExtension].Enabled = True
Me![WorkDDI].Enabled = True
Me![MobilePhone].Enabled = True
Me![FaxNumber] = True
Me![EmailName] = True
Me![Goto_Button].Enabled = True
End If

Only to have every field become disabled on every row.

ummmmmmmmmmmmmmmmmmmmmm?????????????????

Can it be done and if so how?

Thanks in advance
 
Billp said:
I have a subform in a main form.
Parent child relationship (one to many).
The subform is a continuous form with a number of fields and a check box.
I wish to be able to disable on row when the check box is ticked on that
row
only.

I have tried.

If Me![Has_Left] = True Then

Me![LastName].Enabled = False
Me![FirstName].Enabled = False
Me![Title].Enabled = False
Me![ContactName] = False
Me![WorkPhone].Enabled = False
Me![WorkExtension].Enabled = False
Me![WorkDDI].Enabled = False
Me![MobilePhone].Enabled = False
Me![FaxNumber] = False
Me![EmailName] = False
Me![Goto_Button].Enabled = False


Else
Me![LastName].Enabled = True
Me![FirstName].Enabled = True
Me![Title].Enabled = True
Me![ContactName] = True
Me![WorkPhone].Enabled = True
Me![WorkExtension].Enabled = True
Me![WorkDDI].Enabled = True
Me![MobilePhone].Enabled = True
Me![FaxNumber] = True
Me![EmailName] = True
Me![Goto_Button].Enabled = True
End If

Only to have every field become disabled on every row.

ummmmmmmmmmmmmmmmmmmmmm?????????????????

Can it be done and if so how?


You can't do it that way, but you can do it with conditional formatting.
 
I have a subform in a main form.
Parent child relationship (one to many).
The subform is a continuous form with a number of fields and a check box.
I wish to be able to disable on row when the check box is ticked on that row
only.

If you have A2002 or later, select all the controls on the continuous form;
select Format... Conditional Format from the menu; and choose the option to
disable the control based on a field value.

Much tougher if you have an earlier version.
 
Back
Top