Making Access 2000 forms, non editable (1 Viewer)

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
 

RuralGuy

AWF VIP
Local time
Today, 14:47
Joined
Jul 2, 2005
Messages
13,825
Do some searching here. Asked and answered dozens of times.
 

st3ve

Registered User.
Local time
Today, 21:47
Joined
Jan 22, 2002
Messages
75
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.
 

ghudson

Registered User.
Local time
Today, 16:47
Joined
Jun 8, 2002
Messages
6,194
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:

ShaneMan

Registered User.
Local time
Today, 13:47
Joined
May 9, 2005
Messages
1,224
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.
 

st3ve

Registered User.
Local time
Today, 21:47
Joined
Jan 22, 2002
Messages
75
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

Top Bottom