How to make a control locked

  • Thread starter samotek via AccessMonster.com
  • Start date
S

samotek via AccessMonster.com

Can you help me ? I have 2 controls on the subform, called cartons and
quantity.I want to make the control quantity be locked and not enabled when i
enter something. Therefore on the OnEnter event of the control i have the
command Me!Quantity.Locked = True
Howeverr, i have a delete command in the quantity control and somehow the
control is not locked and carries out the delete command which is not what i
want.Can you help me ?

The command in the double click event of Quantity is :

Private Sub Quantity_DblClick(Cancel As Integer)
Call EnableControl("Cartons", True)
Forms![Productspopup].Visible = False
If IsNull(Me!Quantity) Then
MsgBox " no items ! "
Exit Sub
DoCmd.Beep
Else
If Parent!ChkSubOrder = False Then
Call EnableControl("Cartons", True)
deletearecordQuantity ' with this function i delete the chosen product
End If
End If
End Sub
 
P

pietlinden

Can you help me ? I have 2 controls on the subform, called cartons and
quantity.I want to make the control quantity be locked and not enabled when i
enter something. Therefore on the OnEnter event of the control i have the
command Me!Quantity.Locked = True
Howeverr, i have a delete command in the quantity control and somehow the
control is not locked and carries out the delete command which is not what i
want.Can you help me ?

The command in the double click event of Quantity is :

Private Sub Quantity_DblClick(Cancel As Integer)
Call EnableControl("Cartons", True)
Forms![Productspopup].Visible = False
If IsNull(Me!Quantity) Then
MsgBox " no items ! "
Exit Sub
DoCmd.Beep
Else
If Parent!ChkSubOrder = False Then
Call EnableControl("Cartons", True)
deletearecordQuantity ' with this function i delete the chosen product
End If
End If
End Sub

you have to disable the button...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top