Lock A Field

Aug 6, 2006

I've looked through the forum but haven't found quite what I want. I am a novice but realise this is going to be a relatively simple one ....

I use an invoice form for my own business with client details and a sub form with invoice lines. The client is selected via a combo box. I realise the danger that I could inadvertently alter the client, so would like to lock the client field when I move on to the next invoice or close the record, I don't want to lock the invoice lines. Can't get the code quite right and not sure whether this should be AfterUpdate or OnExit?

Any help much appreciated.

View Replies


ADVERTISEMENT

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

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

Lock Field For A Record If Another Field Is Null

Nov 24, 2005

Lock field for a record if another field is null:

I would like to stop users from entering a date in "Ctrl Closed" unless they have populated "Ctrl Reason" for any given record.

Not sure how to do this.

Any ideas would be greatly appreciated.

View 6 Replies View Related

Lock The Field

Apr 22, 2006

Hi,

I create the datasheet form,
I know how to lock the field, but it lock the whole column of the field.
I want to lock the field except the last record field only.
Can I do that?

eg.
ID Field1 Field2
1___a______b
2___c______d
3___z

I want to lock the field2 except the ID=3

Please let me know, thanks.

View 1 Replies View Related

Need Help To Lock A Field

Aug 6, 2006

I'm doing a project for Tafe and I have some yes no questions on my form and a text box next to each one for detials if the answer was no for tick box I want the text box not to be able to write in ...

View 8 Replies View Related

Allow A Field To Be Edited Once, Then Lock Or Disable

May 26, 2005

The question is in the title...
How do I allow people to enter data into a field once, but then lock it or disable it from being editted later.
Tried this:
Private Sub SubmittedD_Enter()
If SubmittedD = Null Then
SubmittedD.Locked = False
Else
SubmittedD.Locked = True
End If
End Sub
but the If statement isn't working... it just does the Else statement regardless of wether SubmittedD is null or not.

Thank you.

View 3 Replies View Related

Forms :: How To Lock A Field If Equal To A Value

Oct 9, 2014

I'm still using Access 2003 to manage our membership database, is it possible to lock a field(member's name) if the membership is equal to withdrawal or terminated? Possible to use "on click"?

View 3 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

Modules & VBA :: Lock Down A Field Through Code?

Jun 7, 2013

I have a field within a form that needs to be modified based off of someone's access level and I have written that part but not sure how to keep others from modifying the field.

Code:
Private Sub Qty_Rcvd_Click()
If ap_GetUserName() = "Danny_Davis" Or ap_GetUserName() = "christopher_ayers" Or ap_GetUserName() = "Tena_McCrackin" Then
GoTo 10
Else
MsgBox "You are not authorized to view this form"
End If
10
End Sub

Right now this code will bring up the msgbox for someone not authorized but once they hit "ok" the msgbox goes away and they can still change the field. What can I type in here to lock down the field for someone not authorized?

View 3 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

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

Forms :: Lock One Field So That Once User Input Data It Never Change Until Closed

Nov 28, 2013

I have a form in Access2000 with 5 text fields which get transferred to the table for each new record. Is there a way i can "LOCK" one field so that once the user has input that data it never changes until closed. I can already lock the field but once i create a new record the field then goes blank.

View 4 Replies View Related

Lock Records

Oct 30, 2005

My company has asked for an issue tracking database with the requirements that if is someone is edditing records it locks that block down until that user is done. I don't have any idea how to do it. my db is set up this way.

tables
tblPolls
tblIssues

Querries
qryPolls
qryIssues
qryFindPollsByID
qryFindPollsbyName


Forms
FrmFindPolls
FrmSearchResultsbyId
FrmSearchResultsbyName
FrmIssueTrackingMain
FrmIssueTrackingSub

The Form Issue Tracking Main has the Sub form IssueTracking Sub
Here users enter the issues in the sub form. The forms are linked by Poll ID
Is there a way to lock all the records with the same pollid in the tbltblIssues. Also to check who is editing them at the time?

View 2 Replies View Related

How To Lock Records

Apr 5, 2006

I've set up a database for use by a team of approx 10 people. I've got problems with locking records so that only 1 user can edit a record at one time. This is happening in a form with a subform included... Can anyone help?

View 6 Replies View Related

Lock Problem

Aug 16, 2007

hello,

Access gives me the following error:
runtime error 3326 this recordset is not updatable
How do I make a recordset UPDATABLE?

2 days ago, I was able (from front end file) to open a table (in the back end in another computer) and modify the records or add a new one. Yesterday, Office 2007 was automatically updated from the internet, and now I can open the tables but it locks me (it doesn't let me modify or add anything)

Does anyone have any idea of what's going on and how to fix this?
thank you

View 6 Replies View Related

How To Lock Tables

Oct 13, 2004

hi,
i have created a table with 2 records.i want to lock the record such that nothing can be done with the existing records but allows to add new records.wat should i do??
thank u

View 3 Replies View Related

Lock Table

Nov 5, 2005

I want to lock a table to disallow further records.
I want to have only one record (I would have created this rec by myself) to store initial conditions and infos such Username/company etc.
Any ideas?
I'm also interesting in other solutions than locking a table if sucj a thing is not possible or nt functional.

Tnx in advance

View 3 Replies View Related

Record Lock

Dec 1, 2005

I have a created a database for insurance policies.
I'm using a form in the database to edit the data in the underlying table.
I use "pessimistic lock" in the database and in the form.
The database runs in a multi-user environment.

My question is the folowing:

When a user is editing a record, it is obvious that this record is set to
lock in the table (--> pessimistic lock), but the 4 records that are right before this record
are also locked too!

There is nobody else editing at that same moment in the database and it is
not a one-time occurence!

Can somebody help me out with this one... I'm realy desperite and I
searched the entire forum.

View 2 Replies View Related

Lock A Table

Apr 12, 2007

I'm working on a database that calls on a table of zipcodes. All of these zipcodes have latitudes and longitudes connected to them..... I've searched around but cant seem to find anything on locking a table. Is it possible to lock down a table so changes cannot be made?.....(until I need to make them)

View 1 Replies View Related

How To Lock Tables

Aug 30, 2007

hello to all

i want to lock the tables and queries of my database in access so the users cant modify any information

View 1 Replies View Related

Lock Down Record

Feb 2, 2005

Hi all. I have a form that when I click a button is automatically changes a field on another form and then closes both forms. Can I add anything to this button to stop that record from being altered again. IE. when i click on this close job button nobody can ever change the record again. Thanks.

View 1 Replies View Related

Security Lock

Jun 10, 2005

Dear everyone

I have enclosed a sample need someone to help.

I have a form and in the form there are sentitive information such as cost price. Is there a way to make it invisible or make it protected (cannot see) and then set a button beside this field, if I want to see the data in that field, I just need to click the button, it will appear with a password(for security wise, this button must be password protected) only when I key the correct password then it will appear.

Can someone help me please.

Thanking in advance.

View 2 Replies View Related

Cant Lock Record HELP!

Jun 15, 2006

Hi All, I've searched the forum and have found a lot of info on locking records/forms. I pulled this from a thread but it doesnt work. I have a subform with many fields with a check box. if the check box is true then I want to lock that record(or the form). I loaded this in the on current event and I can still edit the form and or record.


if me.closed = - 1 then

Me.AllowEdits = No
Me.AllowDeletions = No
else

Me.AllowEdits = yes
Me.AllowDeletions = yes


thanks

View 3 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







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