I'm currently using Access 2007 and I would like to lock down controls in a
form with a button, but AFTER it has been edited by the user. In this forum,
I read about some pretty clever coding for locking bound controls, but it
doesn't quite fit my needs. The new forms usually open in a locked state
(which bothers me a bit since data will be added regularly), while some blank
textboxes, that the user has to fill by himself, are not locked at all.
I would like the form to open unlocked by default (or at least apply no
locks on a newly created form), so that the user can manually lock all the
controls, bound or unbound, with a click on a command button, after he's
finished. Maybe it's not kosher with Access, but I'd prefer to avoid heavy
programming in VBA, for I am not really an expert on that matter.
Thanks in advance !
|
|
0
|
|
|
|
Reply
|
Utf
|
2/12/2010 8:11:02 PM |
|
Forms have properties to manage this.
On the form's property dialog, on the data tab.
Look at the property for allow edits.
If allow edits is set to false, user can't edit any controls.
You're button can simply set allow edits to false.
Me.AllowEdits = False
You may need to do any validation checks (if you have any) before user locks
the form.
Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
"Daniel P." <DanielP@discussions.microsoft.com> wrote in message
news:C578088E-F0DF-41E6-82C0-2FA697F28F59@microsoft.com...
> I'm currently using Access 2007 and I would like to lock down controls in
> a
> form with a button, but AFTER it has been edited by the user. In this
> forum,
> I read about some pretty clever coding for locking bound controls, but it
> doesn't quite fit my needs. The new forms usually open in a locked state
> (which bothers me a bit since data will be added regularly), while some
> blank
> textboxes, that the user has to fill by himself, are not locked at all.
>
> I would like the form to open unlocked by default (or at least apply no
> locks on a newly created form), so that the user can manually lock all the
> controls, bound or unbound, with a click on a command button, after he's
> finished. Maybe it's not kosher with Access, but I'd prefer to avoid heavy
> programming in VBA, for I am not really an expert on that matter.
>
> Thanks in advance !
|
|
0
|
|
|
|
Reply
|
Jeanette
|
2/12/2010 9:51:27 PM
|
|
Thanks a lot, first of all for the advice !
For some reason, I can't get Allow Edits to function the way you suggest...
If I put this option on "No" in the Form Properties, I can edit anything
within the form without any trouble. Am I doing something wrong ?
"Jeanette Cunningham" wrote:
> Forms have properties to manage this.
> On the form's property dialog, on the data tab.
> Look at the property for allow edits.
> If allow edits is set to false, user can't edit any controls.
>
> You're button can simply set allow edits to false.
> Me.AllowEdits = False
>
> You may need to do any validation checks (if you have any) before user locks
> the form.
>
> Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
>
>
>
> "Daniel P." <DanielP@discussions.microsoft.com> wrote in message
> news:C578088E-F0DF-41E6-82C0-2FA697F28F59@microsoft.com...
> > I'm currently using Access 2007 and I would like to lock down controls in
> > a
> > form with a button, but AFTER it has been edited by the user. In this
> > forum,
> > I read about some pretty clever coding for locking bound controls, but it
> > doesn't quite fit my needs. The new forms usually open in a locked state
> > (which bothers me a bit since data will be added regularly), while some
> > blank
> > textboxes, that the user has to fill by himself, are not locked at all.
> >
> > I would like the form to open unlocked by default (or at least apply no
> > locks on a newly created form), so that the user can manually lock all the
> > controls, bound or unbound, with a click on a command button, after he's
> > finished. Maybe it's not kosher with Access, but I'd prefer to avoid heavy
> > programming in VBA, for I am not really an expert on that matter.
> >
> > Thanks in advance !
>
>
> .
>
|
|
0
|
|
|
|
Reply
|
Utf
|
2/13/2010 12:38:01 AM
|
|
Are you sure that you set allow edits to No on the same form that you are
test ing?
Perhaps you have a subform on that form and the subform needs to have allow
edits set to No?
Perhaps you have some code behind that form that sets allow edits to Yes?
Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
"Daniel P." <DanielP@discussions.microsoft.com> wrote in message
news:C91EAE56-34F9-4438-BBF4-7AF94CBBF150@microsoft.com...
> Thanks a lot, first of all for the advice !
>
> For some reason, I can't get Allow Edits to function the way you
> suggest...
> If I put this option on "No" in the Form Properties, I can edit anything
> within the form without any trouble. Am I doing something wrong ?
>
> "Jeanette Cunningham" wrote:
>
>> Forms have properties to manage this.
>> On the form's property dialog, on the data tab.
>> Look at the property for allow edits.
>> If allow edits is set to false, user can't edit any controls.
>>
>> You're button can simply set allow edits to false.
>> Me.AllowEdits = False
>>
>> You may need to do any validation checks (if you have any) before user
>> locks
>> the form.
>>
>> Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
>>
>>
>>
>> "Daniel P." <DanielP@discussions.microsoft.com> wrote in message
>> news:C578088E-F0DF-41E6-82C0-2FA697F28F59@microsoft.com...
>> > I'm currently using Access 2007 and I would like to lock down controls
>> > in
>> > a
>> > form with a button, but AFTER it has been edited by the user. In this
>> > forum,
>> > I read about some pretty clever coding for locking bound controls, but
>> > it
>> > doesn't quite fit my needs. The new forms usually open in a locked
>> > state
>> > (which bothers me a bit since data will be added regularly), while some
>> > blank
>> > textboxes, that the user has to fill by himself, are not locked at all.
>> >
>> > I would like the form to open unlocked by default (or at least apply no
>> > locks on a newly created form), so that the user can manually lock all
>> > the
>> > controls, bound or unbound, with a click on a command button, after
>> > he's
>> > finished. Maybe it's not kosher with Access, but I'd prefer to avoid
>> > heavy
>> > programming in VBA, for I am not really an expert on that matter.
>> >
>> > Thanks in advance !
>>
>>
>> .
>>
|
|
0
|
|
|
|
Reply
|
Jeanette
|
2/13/2010 7:51:18 AM
|
|
|
3 Replies
739 Views
(page loaded in 0.053 seconds)
Similiar Articles: Lock a form - microsoft.public.access.formsI'm currently using Access 2007 and I would like to lock down controls in a form with a button, but AFTER it has been edited by the user. In this fo... Lock/unlock form button - microsoft.public.access.forms ...I've successfully created a button that locks/unlocks all the fields in a form. In addition, it keeps all fields unlocked during initial record crea... Lock to current record - microsoft.public.access.formsI have a form that opens to a new record. I need to prevent users from using the control f and the mouse scroll to go to another record while the fo... How do I Lock a field in a sub-form - microsoft.public.access ...I have a customer info input form and link to a subform. However, I would like to lock a particular field in this subform and leave the rest of the ... Lock Current record on a 'continuous' form? - microsoft ...Hello, I am looking for some code that will allow me to lock the current record (i.e., prevent future changes to any fields on that record), once a... New page - Locking fields on a form in Microsoft Access ...In some situations you may want to lock the fields on a form unless the user explicitly choose to update the transactions. While you could set the f... Lock and unlock records - microsoft.public.access.forms ...Hello, I have a form that accesses a table. On the form is a Yes/No checkbox (from the table). I want to be able to lock all the other fie... Lock a Table - microsoft.public.access.formscodingHi All, Is there a convenient way to programatically allow the current user to have full access to a table in the current db, while preventing other... Locking a single record or row in access subform - microsoft ...Hi, I Hope you guys can help me. I need to lock a single record in a suborm. The code I have is (in the subform) I basically need to allow only one ... How to lock field after entering value to the field - microsoft ...Hi, I have a form which has two fields that need to be filled up. The first one is the Math score (1-100 range) and a checkbox field named HasMajor. ... How to Lock a Form in Word 2007 | eHow.comIf you need to protect the form you spent countless hours creating in Word 2007, placing a security lock on it can be one way of ensuring nobody can modify your ... How to: Lock Controls to Windows Forms - Microsoft Corporation ...When you design the user interface (UI) of your Windows application, you can lock the controls once they are positioned correctly, so that you do not inadvertently ... 8/1/2012 1:59:30 PM
|