Command Buttons

  • Thread starter Thread starter lynette
  • Start date Start date
L

lynette

I defined an Onclick event procedure of a command button
to lock textboxes after data entry when the user cklicks
on it. how come when i move to a new record to enter a new
set of data, although the form is blank, the the command
button remains pressed thus the textboxes stays 'locked'.
how do i 'refresh' the form so that it allows the user to
enter new set of data and lock that record it after data
entry.

is there also a way i can disable the command button after
it is pressed? i've been getting a focus error.

thanks for taking time to read and reply to my query.

lynette
 
thanks!!!
-----Original Message-----
In a continuous forms view, what you do to one control on one record will be
done to all instances of that control on all records. You will need to
unlock the control again when you move to the new record. You could use the
OnCurrent event of the form to do this:

Private Sub Form_Currrent()
If Me.NewRecord = True Then
Me.ControlName.Locked = False
End If
End Sub

--
Ken Snell
<MS ACCESS MVP>




.
 
Back
Top