Show records

aymanmb

Registered User.
Local time
Today, 16:48
Joined
Jan 28, 2007
Messages
96
I have a form that set to open in add mode so previous records do not appear.

I want to have a button that will make all reords appear for the user to edit them,.

what code is required
 
To allow editing:
Code:
Private Sub EnableEditing_Click()
  Me.DataEntry = False
  Me.Requery
End Sub

To disable editing:
Code:
Private Sub DisableEditing_Click()
  Me.DataEntry = True
  Me.Requery
End Sub
 
aymanmb: How do you open a form when someone clicks the 'add' button so that it doesn't show the other records?

missinglinq: To disable editing, does that code need to go with the 'View reocrds' type button? I'm new to writing code, so not too sure where this would lie, but it would really help me with my database.

Thanks :)
 
put missinglinq's disable editing code into the onLoad of the addnewrecord form, or set the addnewrecord form's data entry record property manually and save the form.

You will need two buttons: one for enabling edit and another for disabling.
 
Or, behind the "Add" button you can open your from with:

DoCmd.OpenForm "YourFormName", , , , acFormAdd
 

Users who are viewing this thread

Back
Top Bottom