Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Lock a control

Status
Not open for further replies.

peljo

Technical User
Mar 3, 2006
91
BG

I want to lock a control in the subform but i cannot do it.Even though the control brancho is Null, the control cartons is not locked.Can you help me ?

Private Sub Form_BeforeUpdate(Cancel As Integer)
If IsNull(Me!branch0) Then
Me!cartons.Locked = True
End If
End Sub
 
Subsequently i have found out the following. it is the If IsNull that does not work , However if i write If Me!Brancho = 0 then it works.
Whys is it so ?

If Me!branch0 = 0 Then
'If IsNull(Me!branch0) Then
Me!cartons.Enabled = False
End If
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top