Enable or Disable Edit record

Deon

Registered User.
Local time
Today, 04:43
Joined
Mar 1, 2010
Messages
18
I have created a continues record budget database. I want the records to be saved once i move to the next new line (record). I need to put a macro and lable to indicate (Edit Enabled or Disabled) on the form so i can edit a record if i need to by having a Edit Record Button. Any help appreciated.
Deon
 
Re: Inable or Disable Edit record

You mean you have a continuous form? All records listed down the screen in one long form? If that's what you have then as soon as you move onto a new record, the old one is saved. It's automatic in Access, you don't need to do anything. And you can still edit the previous records, they're not disabled. You don't need a button to enabled editing - just edit them.
 
Re: Inable or Disable Edit record

if you don't want your records to be accidentally changed, create a button that moves record with this code

docmd.RunCommand acCmdRecordsGoToNext
if Me.AllowEdits = False then
'do nothing
else
Me.AllowEdits = False
end if





To allow editing of records, create another button with this code

if Me.AllowEdits = True then
'do nothing
else
Me.AllowEdits = True
end if


HTH
 
Last edited:
Re: Inable or Disable Edit record

Thanks for the replies. I am new to using access and appreciate the help. I know access saves your records but i want to put more protection to prevent records being deleted accidently. I have seen another database that has a button to edit the records and a lable that changes from "edit records enabled" or "edit records disabled" When the lable is in the "edit record disabled" mode the records can not be deleted or changed. Thanks for the code , i will give it a go.
 

Users who are viewing this thread

Back
Top Bottom