Record protecting

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hey pros,
I have a record protection question.
If a user enters data in a subform that is a continueous form of records i
wanted to lock that particular record after the txtDate is entered.
Does anyone know how I can overcome this??
 
Hi
I'm only a beginner here but I use some thing like this.
In the OnCurrent [Event Procedure] set the txtDate field and as may others
as you need to disabled if it meets criteria.

'example
Private Sub Form_Current()
If Me.txtDate.Value = True Then
Me.txtDate.Enabled = False
Me.Otherfields.Enabled=False
Me.Otherfields.Enabled=False
Else
Me.txtDate.Enabled = True
Me.Otherfields.Enabled=True
Me.Otherfields.Enabled=True
End If
End Sub

You could use either the Enabled or Locked Values for the fields.

HTH

John
 
Hey John thanks for your response.
I am using a continueous form as a subform and I would need it to disable
these fields as the user navigates from record to record. So that way if they
should come onto a record where the date is populated they would not be able
to edit it. But if they come accross one where the date value is false, then
they could.....
...ya know?

John said:
Hi
I'm only a beginner here but I use some thing like this.
In the OnCurrent [Event Procedure] set the txtDate field and as may others
as you need to disabled if it meets criteria.

'example
Private Sub Form_Current()
If Me.txtDate.Value = True Then
Me.txtDate.Enabled = False
Me.Otherfields.Enabled=False
Me.Otherfields.Enabled=False
Else
Me.txtDate.Enabled = True
Me.Otherfields.Enabled=True
Me.Otherfields.Enabled=True
End If
End Sub

You could use either the Enabled or Locked Values for the fields.

HTH

John
TimT said:
hey pros,
I have a record protection question.
If a user enters data in a subform that is a continueous form of records i
wanted to lock that particular record after the txtDate is entered.
Does anyone know how I can overcome this??
 
Hi Tim
The example provided does exactly that. Use locked instead of Disabled tho,
its not greyed out.

Regards

John

TimT said:
Hey John thanks for your response.
I am using a continueous form as a subform and I would need it to disable
these fields as the user navigates from record to record. So that way if
they
should come onto a record where the date is populated they would not be
able
to edit it. But if they come accross one where the date value is false,
then
they could.....
..ya know?

John said:
Hi
I'm only a beginner here but I use some thing like this.
In the OnCurrent [Event Procedure] set the txtDate field and as may
others
as you need to disabled if it meets criteria.

'example
Private Sub Form_Current()
If Me.txtDate.Value = True Then
Me.txtDate.Enabled = False
Me.Otherfields.Enabled=False
Me.Otherfields.Enabled=False
Else
Me.txtDate.Enabled = True
Me.Otherfields.Enabled=True
Me.Otherfields.Enabled=True
End If
End Sub

You could use either the Enabled or Locked Values for the fields.

HTH

John
TimT said:
hey pros,
I have a record protection question.
If a user enters data in a subform that is a continueous form of
records i
wanted to lock that particular record after the txtDate is entered.
Does anyone know how I can overcome this??
 
This will work on a single form, but I cannot get it to work on a continueous
form that is set up to look similare to a datasheet.

John said:
Hi Tim
The example provided does exactly that. Use locked instead of Disabled tho,
its not greyed out.

Regards

John

TimT said:
Hey John thanks for your response.
I am using a continueous form as a subform and I would need it to disable
these fields as the user navigates from record to record. So that way if
they
should come onto a record where the date is populated they would not be
able
to edit it. But if they come accross one where the date value is false,
then
they could.....
..ya know?

John said:
Hi
I'm only a beginner here but I use some thing like this.
In the OnCurrent [Event Procedure] set the txtDate field and as may
others
as you need to disabled if it meets criteria.

'example
Private Sub Form_Current()
If Me.txtDate.Value = True Then
Me.txtDate.Enabled = False
Me.Otherfields.Enabled=False
Me.Otherfields.Enabled=False
Else
Me.txtDate.Enabled = True
Me.Otherfields.Enabled=True
Me.Otherfields.Enabled=True
End If
End Sub

You could use either the Enabled or Locked Values for the fields.

HTH

John
hey pros,
I have a record protection question.
If a user enters data in a subform that is a continueous form of
records i
wanted to lock that particular record after the txtDate is entered.
Does anyone know how I can overcome this??
 
In design mode,
Access the properties of the subform and enter the details in the OnCurrent
field, Event Procedure.

Regards

John


TimT said:
This will work on a single form, but I cannot get it to work on a
continueous
form that is set up to look similare to a datasheet.

John said:
Hi Tim
The example provided does exactly that. Use locked instead of Disabled
tho,
its not greyed out.

Regards

John

TimT said:
Hey John thanks for your response.
I am using a continueous form as a subform and I would need it to
disable
these fields as the user navigates from record to record. So that way
if
they
should come onto a record where the date is populated they would not be
able
to edit it. But if they come accross one where the date value is false,
then
they could.....
..ya know?

:

Hi
I'm only a beginner here but I use some thing like this.
In the OnCurrent [Event Procedure] set the txtDate field and as may
others
as you need to disabled if it meets criteria.

'example
Private Sub Form_Current()
If Me.txtDate.Value = True Then
Me.txtDate.Enabled = False
Me.Otherfields.Enabled=False
Me.Otherfields.Enabled=False
Else
Me.txtDate.Enabled = True
Me.Otherfields.Enabled=True
Me.Otherfields.Enabled=True
End If
End Sub

You could use either the Enabled or Locked Values for the fields.

HTH

John
hey pros,
I have a record protection question.
If a user enters data in a subform that is a continueous form of
records i
wanted to lock that particular record after the txtDate is entered.
Does anyone know how I can overcome this??
 
Back
Top