Thanks, Bob I only cross posted because on the other forum no one could understand what I was trying to do. Fresh eyes often have a fresh perspective so I will continue to do this in the future if required. That Micron individual seemed to want to split hairs and blame me for him not knowing how to solve the problem, either someone helps because they want to, or they don't it is entirely up to them, I would rather people with patience who genuinely want to share their expertise help me.
I already know how to lock everything but I do not want to do that
Actually both Micron and myself understood perfectly what you required.Thanks, Bob I only cross posted because on the other forum no one could understand what I was trying to do.
I would agree that "fresh eyes often have a fresh perspective" and if you continue to cross-post in the future without referencing your other posts then I hope you get the response that the link I posted suggests is a possibility. I know that's what I'll be doing !Fresh eyes often have a fresh perspective so I will continue to do this in the future if required.
I consider your remarks to be highly disingenuous. "That Micron individual" is actually a much respected member of the other forum who has been kind enough to patiently help hundreds of other members for many years past.That Micron individual seemed to want to split hairs and blame me for him not knowing how to solve the problem, either someone helps because they want to, or they don't it is entirely up to them, I would rather people with patience who genuinely want to share their expertise help me.
Function ImLocked(frm As Form, LockIt As Boolean) As Boolean
'Lock or unlock all data-bound controls on form,
'depending on the value of <LockIt>: True = lock; False = unlock.
'Dirk Goldgar 2005
'2012 rtw modified to lock specific controls
On Error GoTo Err_ImLocked
Const conERR_NO_PROPERTY = 438
Dim ctl As Control
For Each ctl In frm.Controls
With ctl
If Left(.ControlSource & "=", 1) <> "=" Then
If ctl.Tag = "locked" Then
.Locked = LockIt
.Enabled = True
End If
End If
End With
Skip_Control: 'come here from error if no .ControlSource property
Next ctl
Exit_ImLocked:
Exit Function
Err_ImLocked:
If Err.Number = conERR_NO_PROPERTY Then
Resume Skip_Control
Else
MsgBox "Error " & Err.Number & ": " & Err.Description
Resume Exit_ImLocked
End If
End Function