how to protect field

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

Guest

I have date field in a form, which can be entered only once

it should not allow any changes onto that field if done later e.g delted, or
reentered it

thanks
 
Gerald said:
I have date field in a form, which can be entered only once

it should not allow any changes onto that field if done later e.g
delted, or reentered it

In the Current event of the form...

Me!TextBoxName.Locked = Not IsNull(Me!TextBoxName)

As the user navigates between records that code will lock the TextBox on any
record where it is already filled in.
 
Gerald said:
I have date field in a form, which can be entered only once

it should not allow any changes onto that field if done later e.g delted,
or
reentered it

thanks

Put some code in the form's On Current event (untested):

If IsNull(Me.txtMyDate) Then
Me.txtMyDate.Locked = True
Else
Me.txtMyDate.Locked = False
End If

HTH - Keith.
www.keithwilby.com
 
Back
Top