Making Access 2000 forms, non editable

  • Thread starter Thread starter Kennethcocks
  • Start date Start date
K

Kennethcocks

Guest
Could anyone out there tell me if it is possible to make the output on an Access form read only.
I want to be able to input information as records, but when it is saved I don't want it be able to be altered.
Mainly I am saving recipes on a form, and I don't want my children to be able to add anything to a record once it has been saved.
Thanks in advance
Ken
 
Do some searching here. Asked and answered dozens of times.
 
Make form read only

Did you find a reference to read only forms, because I cannot find any references either!

This is bound to have been answered before, but I have searched for this and either get zillions of results or none.

Can someone please point me to a suitable thread.

Thanks.
 
In the OnCurrent event of the form you should check if the record is new and if false then set the data properties to false so that the current record can not be edited or deleted.

There have got to be plenty of threads related to something like this...
Code:
Private Sub Form_Current()

    If Me.NewRecord = False Then
        Me.AllowEdits = False
        Me.AllowDeletions = False
    Else
        Me.AllowEdits = True
        Me.AllowDeletions = True
    End If
 
End Sub
 
Last edited:
ghudson said:
In the OnCurrent event of the form you should check if the record is new and if false then set the data properties to false so that the current record can not be edited or deleted.

There have got to be plenty of threads related to something like this...
Code:
Private Sub Form_Current()
 
Private Sub Form_Current()
 
    If Me.NewRecord = False Then
        Me.AllowEdits = False
        Me.AllowDeletions = False
    Else
        Me.AllowEdits = True
        Me.AllowDeletions = True
    End If
 
End Sub

Just in case you copy and paste this...The 'Private Sub Form_Current()' only needs to be entered once. I'm sure Mr. Hudson just did a copy and paste and it appeared twice instead of once.
 
Thanks for the code, link and advice.

Moral seems to be to use the Advanced search rather than the plain basic one.
 

Users who are viewing this thread

Back
Top Bottom