dan-cat
Registered User.
- Local time
- Today, 22:09
- Joined
- Jun 2, 2002
- Messages
- 3,416
Hope you can help. I am having trouble setting the lock property of a field to true.
I have a combo field called "Type" in the Main Order form. I want to lock this field whenever there is a record within the Sub Order form. Here is what I have written so far:
Private Sub Form_Current()
If DCount("Id", "tblOrdersSub", "OrderId=Forms!frmOrders!OrderId") > 0 Then
[Forms]![frmOrders]![Type].Locked = True
Else
[Forms]![frmOrders]![Type].Locked = False
End If
End Sub
This only seems to lock the field once you come out of the main order record completely and then go back in. Any ideas on how to make the field lock immediately?
Thanks Dan
I have a combo field called "Type" in the Main Order form. I want to lock this field whenever there is a record within the Sub Order form. Here is what I have written so far:
Private Sub Form_Current()
If DCount("Id", "tblOrdersSub", "OrderId=Forms!frmOrders!OrderId") > 0 Then
[Forms]![frmOrders]![Type].Locked = True
Else
[Forms]![frmOrders]![Type].Locked = False
End If
End Sub
This only seems to lock the field once you come out of the main order record completely and then go back in. Any ideas on how to make the field lock immediately?
Thanks Dan