A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Delete record button not working (allowedits = true)?



 
 
Thread Tools Display Modes
  #1  
Old May 11th, 2010, 09:34 AM posted to microsoft.public.access.forms
Sandroid
external usenet poster
 
Posts: 16
Default Delete record button not working (allowedits = true)?

I set AllowEdits to False in forms and created a "edit record" button
to se AllowEdits to True as follows:

"
I had a similar way also. For your form go to the Form, Properties,
DataTab and set AllowEdits to NO. Next, create a CommandButton,
without the wizard, and then go to the Properties of the
CommandButton, click on OnEvent then click on CodeBuilder (...) In
there you simply put: Me.AllowEdits = True

Oh, in the Form's Properties on the AfterUpdate Event click on the
CodeBuilder again and type this: Me.AllowEdits = False

Now when your form opens it can't be Edited until you click on the
CommandButton, labeled something like EDIT RECORD. Once you finish
that record and tab out of it you automatically go back to a Non-
Editable form. OR create a CommandButton to set it to Save the record
on demand and set the AllowEdits = False there.
"

Now everything else is fine but delete record button won't work even
when I cliks the button which sets Me.allowedits = True.

error msg is like: command or action "deleterecord" is not usable

What's wrong here?

-S
  #2  
Old May 11th, 2010, 12:01 PM posted to microsoft.public.access.forms
Sandroid
external usenet poster
 
Posts: 16
Default Delete record button not working (allowedits = true)?

On 11 touko, 11:34, Sandroid wrote:
I set AllowEdits to False in forms and created a "edit record" button
to se AllowEdits to True as follows:

"
I had a similar way also. For your form go to the Form, Properties,
DataTab and set AllowEdits to NO. Next, create a CommandButton,
without the wizard, and then go to the Properties of the
CommandButton, click on OnEvent then click on CodeBuilder (...) In
there you simply put: Me.AllowEdits = True

Oh, in the Form's Properties on the AfterUpdate Event click on the
CodeBuilder again and type this: Me.AllowEdits = False

Now when your form opens it can't be Edited until you click on the
CommandButton, labeled something like EDIT RECORD. Once you finish
that record and tab out of it you automatically go back to a Non-
Editable form. OR create a CommandButton to set it to Save the record
on demand and set the AllowEdits = False there.
"

Now everything else is fine but delete record button won't work even
when I cliks the button which sets Me.allowedits = True.

error msg is like: command or action "deleterecord" is not usable

What's wrong here?

-S


Forget this, resolved.
  #3  
Old May 11th, 2010, 12:31 PM posted to microsoft.public.access.forms
RonaldoOneNil
external usenet poster
 
Posts: 345
Default Delete record button not working (allowedits = true)?

There is a separate form property called Allow Deletions

"Sandroid" wrote:

I set AllowEdits to False in forms and created a "edit record" button
to se AllowEdits to True as follows:

"
I had a similar way also. For your form go to the Form, Properties,
DataTab and set AllowEdits to NO. Next, create a CommandButton,
without the wizard, and then go to the Properties of the
CommandButton, click on OnEvent then click on CodeBuilder (...) In
there you simply put: Me.AllowEdits = True

Oh, in the Form's Properties on the AfterUpdate Event click on the
CodeBuilder again and type this: Me.AllowEdits = False

Now when your form opens it can't be Edited until you click on the
CommandButton, labeled something like EDIT RECORD. Once you finish
that record and tab out of it you automatically go back to a Non-
Editable form. OR create a CommandButton to set it to Save the record
on demand and set the AllowEdits = False there.
"

Now everything else is fine but delete record button won't work even
when I cliks the button which sets Me.allowedits = True.

error msg is like: command or action "deleterecord" is not usable

What's wrong here?

-S
.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:51 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.