No Edits to Saved Data

  • Thread starter Thread starter newbie via AccessMonster.com
  • Start date Start date
N

newbie via AccessMonster.com

Hi

Im alittle stuck, can someone help?

I have a form with required data entry - once saved, i dont want them to be
edited/deleted...does anyone know how this can be achieved?

I've tried: [CustomerText is set to Locked Yes and i've tried it with Locked
No]

If Not (isnull(me.customer_id)) then
me.customer_id.locked = true
End if

But it doesnt seem to work- does anyone have any other suggestions?
 
Try setting these properties for your form:
Allow Edits No
Allow Deletions No
Allow Additions Yes
 
Thanks Allen

It works great - i cant make any edits on previous entries however it doesnt
work for edits made to textboxes that use calendars - (i feature i forgot to
mention)

I have a textbox (when mouse down) a calendar opens, user clicks date,
calender disappears, new date stored in textbox. This 'feature' still happens
even when the form's setting have been changed and even when i've locked that
textbox!!

I have no clue how to slove this, i've tried editing the calendar code to -

If Not (isNull(me.customer_name)) Then
me.calendar1.visible = true
End if

However in Calendar1_Click () -
calendar1.value = oxcCalendar.Value (the same calendar is being used for
multiple textboxes)
calendar1.SetFocus
calendar1.Visible = False
Set calendar1 = Nothing
End Sub

When i set the me.calendar1.visible = true, an error appears saying it cant
be done as the focus in set on calendar1!

Is there anyway out of this?!
 
I'm not exactly clear about the code that is being called here, but could
you wrap the existing code in a test of the NewRecord property of the form,
so it does nothing unless the form is at a new record?

Example:

If Me.NewRecord Then
If Not (isNull(me.customer_name)) Then
me.calendar1.visible = true
End if
End If
 
Back
Top