From: Sandroid on 11 May 2010 04:34 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
From: Sandroid on 11 May 2010 07:01 On 11 touko, 11:34, Sandroid <santeri.virta...(a)gmail.com> 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.
From: RonaldoOneNil on 11 May 2010 07:31 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 > . >
|
Pages: 1 Prev: Internet Explorer 8 Update problem Next: Default Value =Date$() in UK Date Format |