Allow editing button

worldcert

Registered User.
Local time
Today, 13:37
Joined
Jan 12, 2006
Messages
13
Hello, I have a problem that im struggling to fix.

I have a database and the form is set to not allow editing on the clients page.

I would like a button so I could click to enable / disable editing.

For example when I open the form you cannot edit the record. I click the button and it now allows me to edit the record. When im finished I click the button to disable editing.

Here is my code I tried but with no success.

If Me.AllowEdits = False Then
Me.AllowEdits = True
Me.Edit.Caption = "Allow Editing"
Else
Me.AllowEdits = False
Me.Edit.Caption = "No Editing"
End If



The error message is as follows.

COMPILE ERROR
METHOD OR DATA MEMBER NOT FOUND

Any help would be appreciated.
 
I have justed tested your code and it worked fine for me.

The only change I made was to the lines

Me.Edit.Caption = "Allow Editing"
and
Me.Edit.Caption = "No Editing"

Where I changed "edit" to the name of the button I was using

HTH
 
Hi Rabbie

Thanks for your reply. I half fixed the problem. The Name of the button was different from that stated in the code. I changed the name and button now works. HOWEVER here is my process ..

I open the form and cannot edit the record. GOOD

I click the button and it allows me to edit the record. GOOD

When I re click the button after modifying the record it still allows me to modify the record. BAD

Do I need to add a save button or is there a fix? Thanks in advance if you ansewr. :o
 

Users who are viewing this thread

Back
Top Bottom