Lock / Unlock Form

Jun 19, 2006

Hi,

I am trying to open my form locked and have the uers click a button to unlock the form to enter data. The way i do it now is have 2 forms one set to allow edits "yes" the other set to "no" and then have a button for each

This is working ok but i would like to tidy things up a bit and get it to one button.

I struggle with programming but i will do my best to understand any posts.

Thxs for any help

Adz

View Replies


ADVERTISEMENT

Forms :: Lock / Unlock Form AND Subforms From Editing Data

Mar 24, 2014

I have a form with several subforms within (tabbed subforms). I've used the code:

In the Current event of the parent form -

Code:
Me.AllowEdits = False
Me.AllowDeletions = False
Me.AllowAdditions = False

In the Current event of each of the subforms -

Code: (THIS NEVER WORKS FOR ME - RUNTIME ERROR)
Me.AllowEdits = Me.Parent.AllowEdits
Me.AllowDeletions = Me.Parent.AllowDeletions
Me.AllowAdditions = Me.Parent.AllowAdditions

In the Click event of the button -

Code:
Me.AllowEdits = True
Me.AllowDeletions = True
Me.AllowAdditions = True

So the main form is locked upon opening and unlocked with the click of an unlock button. How to apply this to the subforms as well. They just stayed unlocked the whole time.

View 14 Replies View Related

Forms :: Lock / Unlock Textboxes Based On Option Button?

May 11, 2014

I have a form with 2 option buttons on it one with year 12 on it and one with year 13. I have a simple form with drop down menus and text boxes allocated for year 12s and 13s. I want all of the year 13 text boxes and drop down lists to be locked if year 12 is selected and I want all of the year 12 text boxes and drop down lists to be locked if year 13 is selected. I do not want to over complicate the form by hiding parts of it or having a new form open depending on the option button selected.

View 9 Replies View Related

General :: Lock / Unlock Full Menu Based On A Password

Sep 28, 2014

I want to lock down and unlock the full menu based on a password..

For instance upon load of the database I would like it stripped down when a general user logs in... but if a admin logins in then they get all menus...

so based on the user type will dictate the menus visible.. cane this be achieved'''''''''''';

View 2 Replies View Related

Forms :: Command Button To Unlock And Lock Fields / Edit Button?

Feb 19, 2014

I have created a web-database (? - There are globes over all the forms and tables icons) based on the Issues & Tasks template. This means that most of the data is entered and seen on the "Main" form, which has two tabs - Open Issues and Closed Issues. I have created a form that allows people at my work to input the necessary data and save it, so that it will show up on one of the two tabs. However, once a record has been created, I want to be initially locked if the ID/PK is clicked, so that data can't be changed or entered inadvertently.

SO, I changed the code so that when the ID/PK for a record is clicked, it brings up a different form, but one that looks exactly like the one that is brought up when entering a new form, but I locked all of the fields so that the information cannot be changed. It seems from what I have read that I can create a button on this form so that when clicked, it unlocks the fields on the form so that they can be changed, and then when clicked again it will lock the fields again. Is this true? If so, how can I do it? Or is there something similar I can do? I have seen codes that I could copy and paste, but I cannot figure out the place to copy and paste codes in Access 2010.

I have changed the Form properties so that Data Entry and all the "Allows" are set to No...

View 9 Replies View Related

Form Locked, Unable To Unlock

Feb 13, 2005

Hi all,
I'm having a problem here and after searching the web, I can't find a solution.
Problem is that I have a form which seems to be locked. None of the fields can be modified. This should be ok except for 1 combo-box.
I have checked all objects settings and all objects have:
Edit/Delete/Add options enabled;
Visible option enabled;
Locked option disabled;
The form has only Fromview enabled and recordlock is off.
There is no VB code modifying a 'locked' status.

Can someone help me out here?

My project is +20Mb so first I'd like to see if there are any things I've forgotten to check before I'll strip and post it.

View 6 Replies View Related

Forms :: Unlock Different Fields On Form When Check Couple Is On?

Jun 22, 2013

On mij registration form I have the option to fill in the name and day of birth, email and GSM number of the partner off the main contact.

But to keep the form nice and clear, I only want to make the fields acceseble when the checkbox from [couple] is checkt OK.

How to make the fields and the Box around it Light Gray, so its very clear it issn't clickable.

The main coller is white BG and Green strokes. (see attachment) When the field [paar] 1 (couple in englisch) is OK then the fields in de eclips 2 are available And I want the collors of the stroke 25% black and de fields disabled.

View 2 Replies View Related

Forms :: Unlock Form Based On Combo Box Selection

Mar 17, 2014

I have two forms linked together.

frmMaterialRequest
MaterialRequest
Status

frmHandledBy
MaterialRequest
HandledBy

What I want is to meet the following:

- Form 2 to be locked but its "MaterialRequest" is enabled.
- HandledBy to be unlocked if the MaterialRequest meets the "Status" of "frmMaterialRequest" which is "Approved".

View 9 Replies View Related

Lock And Un Lock A Text Field Through A CMD Button

Jun 13, 2005

I need to lock and unlock a a few text fields with a CMd Button.

and i do know about the allowedits thing, but i only need to apply this to a few fields on my form.

can some one throw me a clue?

View 2 Replies View Related

Unlock Vbe Password

Aug 3, 2005

Hi:

i have a MS Access aplication that have a vba code with a password.

Now i have a patch (in MS Access too) that will upload this full aplication, but when i try to copy a form didnt work. This is because have password in the vbe code.
someone knows how can i unlock the vbe before update the form and after update the from lock in VBA language?

thanks

View 1 Replies View Related

Combo To Unlock Text Field?

Nov 24, 2006

Hi! I'm certin this is something really simple, but I just can't remember how I've done it before.

I have a combo box called "ReferralReason" and when a particular option ("Other") is chosen from the list in there, I want the text field "ReferralReasonOther" to become unlocked.

Could someone please tell me:

a) do I type the VBA code for this in the properties of the combo, or, the text field? (Does it even make a difference)

b) what do I actually type?? :confused:

Thanks in advance for your help!

View 2 Replies View Related

How To Lock A Form For Changes?

Aug 24, 2006

I made a table containing information about products (price, amount, supplier,...). The most inportant info is the order number (cause it's unique).
Then I made a form, containing a combo-box and several text-boxes. The idea is to find a record using the combo-box, and vieuwing the information of that product in the form. This works, but a problem occurs: the order numbers change each time in a single number (I guess the autonumber). How can I solve this problem so that my combo-box is still available for searching, but no changes can be made in the table that is the source for the form?

View 2 Replies View Related

Unhide / Unlock Normal Access Table View And Menus

Oct 11, 2007

Hi..

I got a access file from a friend of mine, but when i open it in access, i don't see any tables or the standard menu buttons.

The only menu i see, is a docked menu with a couple of submenus, wich in turn open forms, where you can enter data..

How can i see the tables and bva script behind this access file?

I tried F11 and Alt-F11, but is does nothing.

He won't tell me how he did it, because he doesnt like to share what he knows...

Can anyone help me??

Thanx !

View 6 Replies View Related

Forms :: Lock A Form On Opening Of Another

Jul 7, 2014

I want to lock a form but keep it visible when a 2nd form opens in front of it. I would also like to keep the 2nd form on top. How to do these 2 things?

View 14 Replies View Related

Forms :: How To Lock A Field In A Form

Sep 12, 2014

Is it possible to lock a field in a form after the user has populated the field? So for example, I have two date fields and I want them to be locked after the user has entered values on those fields. I want to avoid the user to come back in the future and change those fields. However I would like the database administrator to be able to change those dates when needed. How do I do this?

View 5 Replies View Related

'Lock' Switchboard Or Form As Full Screen

Feb 28, 2006

Apologies if I am covering old ground here but unfortunately I cannot find a suitable solution after searching the forum.

Basically my switchboard on Open includes DoCmd.Maximize so that the switchboard does indeed open on full screen. However, say I then leave my database open and work on a different application on my PC then when I click on my database on the taskbar then the form is not longer full screen.

So what I am basically asking is, is there a way of 'locking' it to appear full screen even if I flick between applications on my PC?

Many thanks in advance,

Paul.

View 6 Replies View Related

Modules & VBA :: Lock Multiple Fields At Once In A Form

Aug 7, 2013

I want to incorporate a button that locks a certain portion of my form but my form is still quite long...

Is there a way which I can lock multiple fields at once or do i have to do:

Code:
Field1.Enabled = False
Field2.Enabled = False
Field3.Enabled = False
Field4.Enabled = False

and so on...

View 4 Replies View Related

General :: Lock Picture Of Employee In A Form?

Apr 11, 2013

How can I lock a picture of an employee to his Employee record?

View 5 Replies View Related

Forms :: Lock Form Until Certain Field Is Entered

May 11, 2015

I have a data entry form that I would like to lock all fields until the Contract Number is entered.

to see if I was on the right path I tried something very simple,
on current
if me.contract_num = null then
msgbox("enter contract number")
end if

but that didn't even work

View 8 Replies View Related

General :: VBA To Lock Bound Date Box On Form

Feb 19, 2013

i want to use vba to lock or diable a date box on my form.

I have used[button].Enabled = False

This works ok for buttons but doesn't seem to work for my date

fieldMe.OrderDate.Enabled = False

I get an errormethod or data member not found. it highlights the .Enabled part...

View 7 Replies View Related

Modules & VBA :: Lock Check Box On Open Form

Jun 29, 2015

I'm trying to lock a checkbox when the forms open and depending if one has role as admin, it should unlock it.When I add the below code in the on open form I get error:

Code:
Me.lock_case_admin.Locked = True
Me.lock_case_admin.BackColor = 12632256

This is the part that should onlock if it is admin:

Code:
Me.lock_case_admin.Locked = False
Me.lock_case_admin.BackColor = 16777215

Maybe it is me, or the checkbox is giving the error that causes the dialogbox to open to to choose the ID nr.

View 5 Replies View Related

Modules & VBA :: Lock Certain Fields On Form Based On Value In A Particular Field

Aug 4, 2015

I'm trying to lock certain fields on my form based on the value in a particular field. It seems to work the first time but applies itself to all other records in the database from then on!

The starting point is a command button that sends an email and makes Me.DPLLock = 1. The corresponding table entry is formatted as a number.

The code is...

Private Sub Form_Current()
If Me.DPLLock = 1 Then
Me.OR_Name.Locked = True
Me.OR_Sales_Order.Locked = True
Me.OR_WO_No.Locked = True
Me.OR_Qty.Locked = True

[Code] ....

Ive tried Me!DPLLock with the same result.

View 7 Replies View Related

Forms :: Temporarily Lock Form Field In A New Record

Jun 13, 2013

I would like to be able to lock a form's field temporarily until certain information has been added to other fields. Once the required fields are complete, I want to be able to allow the field to be updated.

Here is a simplified version of the table fields (only including relevant fields):

tblContacts
LastName (Text, Required field, Duplicates OK)
FirstName (Text, Required field, Duplicates OK)
CurrentEmployee (Yes/No field)

Basically, I don't want the user to be able to update the CurrentEmployee field in a new record until the LastName and FirstName fields have been completed.

The reason I want to prevent this is that when CurrentEmployee field is updated, the record is then assigned a ContactID number (PK autoID field) which means that my subform is assigned an ID# and the result is messy if the user decides to abort the creation of the record.

View 7 Replies View Related

Modules & VBA :: Code To Lock / Disable All Form Fields On Inputted Value?

Oct 25, 2013

I am looking to completely disable a record when a specific Yes/No tick box is checked.

By that I mean all form fields are locked and disabled when the Yes/No tick box is checked (Yes)

View 2 Replies View Related

Forms :: Disable / Lock Fields On Form And Subform Based On Checkbox

Feb 15, 2014

I am trying to lock records on a form and subform after a checkbox has been ticked, have used the code below from a previous post.

Private Sub Form_Current()
If Locked = -1 Then
Me.AllowEdits = False
Me.AllowAdditions = False
Me.AllowDeletions = False

[Code] .....

This is locking the Main form records is there a way to code this so that the fields on the subform are also locked when the checkbox is ticked?

View 7 Replies View Related

Lock A Field On Main Form If A Field On A Subform Is Complete?

Oct 24, 2005

hi, i would like to be able to prevent a user from being able to change a field (lock a field) in a main form if a field in a subform is complete. (the field in the subform is named: "new_weekly_base" if this is complete then i would like the field: "weekly base" to be locked on the main form. is this possible?, please help.

the main form is named: "SCREEN-MAIN"
the subform is named: "SCREEN-SUBFORM"
(the main form has a button on it which loads the subform.)

ive tried the below code but it doesnt work, any help would be excellent.

-------------------------------------------------------
Private Sub Form_BeforeUpdate(Cancel As Integer)
If [NEW_WEEKLY_BASE] >= 0 Then

With Me.WEEKLY_BASE
.Visible = True
.Enabled = False
End With
End If
End Sub
------------------------------------------------

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved