Hello,
I've got the following problem:
I have a form which is place on a tabpage. In this form there are several textfields. These fields are divided into two groups.
Furthermore there are two buttons. If button one is pressed then 3 fields get a lock and a different backgroundcolor.
If button two is clicked other fields go into lock with an other backgroundcolor. So far so good.
But, if I want to add a new record the lock from button 1 still resides. But it shouldn't be. All the fields should be editable again, but I dont know how to do it :-S
Can anyone give me a solution? The code for button one(is not its real name though) is pasted below. I am not a real programmer so the code is not that professional.
Thanks in advance,
Thijs Kromhout
The Netherlands
Private Sub Knop35_Click()
On Error GoTo Err_Knop35_Click
Me.eig_bijdr_len.BackColor = 12632256
Me.eig_bijdr_len.Locked = True
Me.inh_weekgeld.BackColor = 12632256
Me.inh_weekgeld.Locked = True
Me.periode.BackColor = 12632256
Me.periode.Locked = True
Me.vergoeding.SetFocus
Exit_Knop35_Click:
Exit Sub
Err_Knop35_Click:
MsgBox Err.Description
Resume Exit_Knop35_Click
End Sub
I've got the following problem:
I have a form which is place on a tabpage. In this form there are several textfields. These fields are divided into two groups.
Furthermore there are two buttons. If button one is pressed then 3 fields get a lock and a different backgroundcolor.
If button two is clicked other fields go into lock with an other backgroundcolor. So far so good.
But, if I want to add a new record the lock from button 1 still resides. But it shouldn't be. All the fields should be editable again, but I dont know how to do it :-S
Can anyone give me a solution? The code for button one(is not its real name though) is pasted below. I am not a real programmer so the code is not that professional.
Thanks in advance,
Thijs Kromhout
The Netherlands
Private Sub Knop35_Click()
On Error GoTo Err_Knop35_Click
Me.eig_bijdr_len.BackColor = 12632256
Me.eig_bijdr_len.Locked = True
Me.inh_weekgeld.BackColor = 12632256
Me.inh_weekgeld.Locked = True
Me.periode.BackColor = 12632256
Me.periode.Locked = True
Me.vergoeding.SetFocus
Exit_Knop35_Click:
Exit Sub
Err_Knop35_Click:
MsgBox Err.Description
Resume Exit_Knop35_Click
End Sub