Reggaefloww
Programmer
I currently have the following code:
For Each ctl In Me.Controls
If ((ctl.Name = "PurchaseOrderNum") Or (ctl.Name = "ID")) Then
ctl.Locked = True
End If
Next ctl
For some reason, I'm getting a Microsoft Access runtime 438 error. It occurs at the ctl.Locked = True section. Can someone please let me know how to lock all form controls except for the control that has a specific name. The same code with MsgBox(Ctl.Name) replacing (ctl.Locked) works like a charm.
Thanks
Dee
For Each ctl In Me.Controls
If ((ctl.Name = "PurchaseOrderNum") Or (ctl.Name = "ID")) Then
ctl.Locked = True
End If
Next ctl
For some reason, I'm getting a Microsoft Access runtime 438 error. It occurs at the ctl.Locked = True section. Can someone please let me know how to lock all form controls except for the control that has a specific name. The same code with MsgBox(Ctl.Name) replacing (ctl.Locked) works like a charm.
Thanks
Dee