Locking Specific Fields
Jan 30, 2007Hey guys,
Is there a setting that will allow me to make specific fields in my table read-only unless I enter a password, or I am the DB administrator?
Hey guys,
Is there a setting that will allow me to make specific fields in my table read-only unless I enter a password, or I am the DB administrator?
Hello, I have just spent ages doing searches and reading everything I can on locking. But, I have yet to find an answer as to how I can lock a specific field in a specific record.
e.g. Staff enter customer details, then at the end of the day the admin (me) checks it over and presses a big old button that stops them from locking certain fields in the current record only - they must still have access to the unlocked fields of the current record, and it must not lock any other records.
I'm guessing there's some VB code in the form of fieldname.lock = true, but then it locks the field throughout the whole table!
Can anyone tell me how to do this please?
I am new to access i have a problem which is i have made a form which contains a subform and a read only subreport, what i want is the ability to select a record in read only subreport as in the picture attached and make a button that when i press on it, it should copy the values of the itemsID field, Packing field, ContainerNo field and origin field from the selected record and then paste them in the subform below.
Also i want to add more then one item, so the when i press on another record it should paste the values below the first record.
Hey guys,
I have a query on a form in which I want to lock the first two rows to prevent the user from manipulating the data. The user will input information in the third column.
How would I go about this
Thanks
Is it possible to access specific records from a Microsoft Access table without locking the whole table?. I have different processess accessing at the same time different records from the same table and I getting an execption, indicating the table is locked. Can any one provide me some help regarding how to access specifi records without locking the whole table in MS Access?
View 1 Replies View RelatedIs there any way other than through coding/controls I can lock specific records in a table.
I have a reference table with less than 200 records on it. 5 and only 5 records need to be locked so that they primarily can not be deleted but also so they can't be edited.
I've read about locking it at form level but that, to me, means some sort of coding.
How do you go about locking certain fields in a table, so that data can only be input to them via the form?? I have a few tick boxes set up, and i want them to changed only in the form, as they can only be ticked under certain circumstances which aren't setup in the table.
View 1 Replies View RelatedHi All,
I am really new to all of this and used to use excel for this stuff.... yes I know... I can hear the screems already .......... :):eek::rolleyes:
What I am trying to do is lock some fields in a form when they are entered so the data can not be changed after they move onto the next record. I think this might be done in the table but can not be sure.
Can anyone point me in the right direction? or some pointers please. Any help would be good.
Many thanks
Hi,
Ok, i have a really stange problem
I have two tables tablea, tableb. They both have the field Line address in which is a number.
However, when i have both these tables in a query and link them on line address the dataview sheet becomes locked. But if i just run a query with tablea on its own, i can write in the dataview and if i just run a query with tableb i can also write in it, but when linked together on line address, it fails
Any ideas?
Thanks
k0r54
i have a form that looks like an invoice.. i want to be able to lock the fields invidually after they are updated but only for the current record being accessed... and password protect them to allow editing..
any suggestions or pointers would be great!
thanks
Hello,
I need a little help with locking some fields in a datasheet.
Simply, there are many fields, one of which is a combo which has either Yes/No fields
I would like to lock the records which have a Yes in the field i mentioned.
Ok, what i've tried already. - in on current and after update.
I have also tried this with the Me. function.
if [avail?] = Yes then
Qty.Enabled = True
StockCode.Enabled = True
StockPoint.Enabled = True
Else
Qty.Enabled = False
StockCode.Enabled = False
StockPoint.Enabled = False
end if
This works but locks fields in all the records even when selection is "No".
Any help will be appreciated.
I have a button on my form which locks (and disables) some fields. by locking and disabling fields, I am able to change the back color of the fields to a "grayed out" look to warn the user that they cannot change the contents of the field.
some of the fields that I have disabled are in fact option buttons and check boxes which have no back color to change, keep this in mind!
So i have a macro that changes ALL of the fields to disabled and locked, as well as their background color.
This causes an error with the check boxes and option boxes so to bipass them I have got the clause "On Error Resume Next" so that my macro continues to complete and finish locking the rest of the form.
With this "On Error Resume Next", If the code reaches a field which has been changed, another error occurs due to a field being changed which blocks the rest of the code from working however why it wont change regardless of the issue, I dont care if the content was saved to a record or not, I just want to put the fields into disabled and locked.
Is there a way I can remove this "You Can't Lock A control while it has unsaved changes" error to ignore that there has been changes? Where the changes just dont matter?
I have 4 questions (4 fields) in a form. 2 are drop down menu type and 2 are open text fields.I would like to limit the user from entering data in the fields if one has been answered. for example: if Question one is answered, question 2, 3 and 4 should be locked and should not allow the users to fill in anything. How do I create that Locking system?
View 10 Replies View RelatedHow can i apply the following code to the immediate record in my subform. I would like when the assigned check box value = true, then the fields for that record become locked.
Ive written the following code to an onclick event for a check box labeled "assigned" on my form, the problem is it executes on all the records in my form.
Q. How do i apply the code to only the immediate record?
Private Sub Assigned_Click()
If Me.Assigned.Value = True Then
Me.Serial_Number.Enabled = False
Me.Component_Group_ID.Enabled = False
Me.TypeID.Enabled = False
Me.Description.Enabled = False
Me.Status.Enabled = False
Else
Me.Serial_Number.Enabled = True
Me.Component_Group_ID.Enabled = True
Me.TypeID.Enabled = True
Me.Description.Enabled = True
Me.Status.Enabled = True
End If
End Sub
On my form I have a set of fields that can be displayed as editable or read-only depending on a "Lockout" checkbox for that record.Is there an easier way of doing this? If not, would it be smarter to create a function to do this? As it stands I'm assuming I would have to have this code run when the form loads, when the Lockout box is clicked, and whenever the record is changed just to ensure that the records are displayed as locked or unlocked appropriately.
Here's what I have:
Code:
Private Sub Lockout_Click()
If [Lockout] = True Then
Me![Customer_Text].Enabled = False
Me![ReqDesc_Text].Enabled = False
Me![MoreInfo_Text].Enabled = False
[code]....
Is there a way to lock the row source fields in the properties menu as currently it keeps creating exceptions (WHERE) onto the end of the SQL this is subsequently causing me major issues in the view of the form/datasheet as fields keep appearing as blank when there is actually values stored within the table.
View 5 Replies View RelatedHello everybody. I am new to Access and as such I don’t know how to perform the following. Please help me out.
The project is about a library loan system. I have a database consisting of the following tables: member (MemCode, LName, …), book (BkCode, Title, TotalCopies,…), purchase (PurDate, BkCode, CopiesBought,…) and transaction (MemCode, BkCode, RentalDate,ReturnDate,Returned).
TotalCopies is the total no. of copies there are of the book
CopiesBought is the number of copies that have been purchased
RentalDate is the date on which book is being loaned
ReturnDate is the last date on which the book has to be returned
Returned is a Yes/No field to indicate if the book has been returned
In the library a member can take only one book at a time.
Problem 1:
The library may have several copies of a particular book, but all will have the same code. For example, a book, let’s say Harry Potter 6 has code 97. Initially only 1 copy of the book is purchased. When the librarian sees the book has great demand, he decides to purchase 3 more copies. All the copies will have the same code, i.e., 97. Only the TotalCopies will become 4.
BkCode is Autonumber in book table and Number in Purchase table. Relationship is 1:many.
I have a Purchase form to record details of books being purchased. I have a command button “Book form” that opens the book form when the user clicks on it. He will use it if the book being purchased is not already available in the library. What I want is:
(i)If he opens the book form to fill in details of the book, then when he closes the form I want the book details to automatically appear in the corresponding fields on the Purchase form.
(ii)The CopiesBought will have to be used to update the TotalCopies in the book table. How should I do this?
Problem 2:
When the user wants to record a loan, the system will need to check if that member already has a book which he has not yet returned. If it is so, then the system will need to provide a prompt to inform the user of this and consequently blocks the user from completing the transaction. How do I do this?
Thanking you in advance for your help.
I have 7 combos, which for the most part set the value in another field - however, there are two values in the combo that do not have a value attached - one is AH, the other is SK. I have two textboxes (one for AH, one for SK) that I wish to have a count (preferably running) of how many times each of these values appears in the seven combo boxes.
View 5 Replies View RelatedWe have a PHP website that utilizes an Access 2003 SP3 database. This website is used as an authorization process for a business process in our company. On the website, 8 different people must "sign off" on the process. This sign off process simply consists of typing your name and date into two different text boxes, as well as a third drop-down menu for "APPROVED" or "DENIED". These, of course, correlate to their respective fields in the Access database.
Within the past year or so, the 8th approval section was added. Since then, there have been sporadic issues where all of the approval fields would simply be erased and everyone has to go back to the form and "re-approve" their fields. I believe we have narrowed the issue to when the 8th person signs off before the 7th person. However, the approvals are not cleared every single time this happens, but this condition exists every time data is cleared. So my question is, would this be an issue related to access, or with the coding of the website?
I am using Access 2007. This is the problem; I have a warehouse divided into four departments North, East, South, and West. Each department is assigned its own storage location range North is N1-N1000, East is E1-E1000, South is S1-S1000, and West is W1-W1000. On the access input form of my database are two fields, one combo box field for Department and one combo box field for location stored.
When the user is updating the data base for parts received or shipped, the user must enter the department and location stored to correctly debit or credit that department. The location stored entered must be assigned to the department. (Example: dept. is north and storage location is N65, the user enters D65 instead, error message is displayed, "you have entered the wrong location").
What I need is instructions how to write the code to check the fields to verify location stored matches department, and display a warning message. How do I do this? I have a table with department names and storage location ranges.
In the footer of my report I have a field that sums the Transaction Amounts - =Sum([Transaction Amount])
I would also like to break the totals down further by Transaction Type Codes.
Something like =Sum([Transaction Amount]) where Transaction Type Code = AL-Exp-Paid
Hi everybody,
My question may sound you stupid but i am a newbie and i think you can help me...
My problem is,
I have records that have the id of a stuff and the error codes of the stuff which are occured in production. Therefore not all of the fields in the record are non-zero. I want to find the non-zero field/fields in a record...
Any help will be greatly appreciated...
Thanks...
OK so here is a working query:
SELECT Assets.*
FROM Assets
WHERE (((EXISTS
(SELECT *
FROM LCAMdump
WHERE Assets.BarcodeNumber = LCAMdump.T_TAG
)) =False))
OR (((EXISTS
(SELECT *
FROM LCAMdump
WHERE ((SELECT BuildingName
FROM Building_Names
WHERE ASSETS.BuildingNameID = Building_Names.BuildingNameID)=LCAMdump.BUILDING)
)) =False))
OR (((EXISTS
(SELECT *
FROM LCAMdump
WHERE ((Assets.FLOOR)=[LCAMdump]![FLOOR])
)) =False))
OR (((EXISTS
(SELECT *
FROM LCAMdump
WHERE ((Assets.DeskLocation)=[LCAMdump]![LOCATION_SEGMENT2])
)) =False))
OR (((EXISTS
(SELECT *
FROM LCAMdump
WHERE ((Assets.BuildingLocation)=[LCAMdump]![LOCATION_SEGMENT1])
)) =False))
OR (((EXISTS
(SELECT *
FROM LCAMdump
WHERE ((SELECT FirstName
FROM Employees
WHERE Assets.EmployeeID = Employees.EmployeeID)=LCAMdump.USER_FIRST)
)) =False))
OR (((EXISTS
(SELECT *
FROM LCAMdump
WHERE ((SELECT LastName
FROM Employees
WHERE Assets.EmployeeID = Employees.EmployeeID)=LCAMdump.USER_LAST)
)) =False))
OR (((EXISTS
(SELECT *
FROM LCAMdump
WHERE ((SELECT SSO
FROM Employees
WHERE Assets.EmployeeID = Employees.EmployeeID)=LCAMdump.LOGIN_SSO)
)) =False))
OR (((EXISTS
(SELECT *
FROM LCAMdump
WHERE ((SELECT UserID
FROM Employees
WHERE Assets.EmployeeID = Employees.EmployeeID)=LCAMdump.USER_LOGIN)
)) =False));
It works great returns the correct results. But I don't need everything out of Assets. I just need a few things from there and a few things from 2 other tables.
I tried this but it now gives back over 220 repeating results.
SELECT Assets.BarcodeNumber ,
Employees.UserID ,
Building_names.BuildingName,
Assets.Floor ,
Assets.BuildingLocation ,
Assets.DeskLocation ,
Employees.FirstName ,
Employees.LastName ,
Employees.SSO
FROM Assets ,
Employees,
Building_Names
WHERE (((EXISTS
(SELECT *
FROM LCAMdump
WHERE Assets.BarcodeNumber = LCAMdump.T_TAG
)) =False))
OR (((EXISTS
(SELECT *
FROM LCAMdump
WHERE ((SELECT BuildingName
FROM Building_Names
WHERE ASSETS.BuildingNameID = Building_Names.BuildingNameID)=LCAMdump.BUILDING)
)) =False))
OR (((EXISTS
(SELECT *
FROM LCAMdump
WHERE ((Assets.FLOOR)=[LCAMdump]![FLOOR])
)) =False))
OR (((EXISTS
(SELECT *
FROM LCAMdump
WHERE ((Assets.DeskLocation)=[LCAMdump]![LOCATION_SEGMENT2])
)) =False))
OR (((EXISTS
(SELECT *
FROM LCAMdump
WHERE ((Assets.BuildingLocation)=[LCAMdump]![LOCATION_SEGMENT1])
)) =False))
OR (((EXISTS
(SELECT *
FROM LCAMdump
WHERE ((SELECT FirstName
FROM Employees
WHERE Assets.EmployeeID = Employees.EmployeeID)=LCAMdump.USER_FIRST)
)) =False))
OR (((EXISTS
(SELECT *
FROM LCAMdump
WHERE ((SELECT LastName
FROM Employees
WHERE Assets.EmployeeID = Employees.EmployeeID)=LCAMdump.USER_LAST)
)) =False))
OR (((EXISTS
(SELECT *
FROM LCAMdump
WHERE ((SELECT SSO
FROM Employees
WHERE Assets.EmployeeID = Employees.EmployeeID)=LCAMdump.LOGIN_SSO)
)) =False))
OR (((EXISTS
(SELECT *
FROM LCAMdump
WHERE ((SELECT UserID
FROM Employees
WHERE Assets.EmployeeID = Employees.EmployeeID)=LCAMdump.USER_LOGIN)
)) =False));
I am sure it something simple but I am a novice at this so please help me. :D
Dear All:
Code:
Private Sub Command150_Click()
On Error GoTo Err_Command150_Click
Dim stDocName As String
stDocName = "ENGINEERING-GRADUATED"
DoCmd.RunMacro stDocName
Exit_Command150_Click:
Exit Sub
Err_Command150_Click:
MsgBox Err.Description
Resume Exit_Command150_Click
End Sub
This is what I am using to export from access to excel. It works great! Many thanks to Mwalts and Colm. How do I go about exporting data to specific fields in excel?
Thanks to all,
Dion
Hi all~
Does anybody know how to go about running a query or macro in Access to import specific fields from all worksheets contained in an excel workbook?
Say I have ExcelFile.xls, and it has worksheets with varying names. I want to pull fields B12, B16, B20, B24, B28 from each worksheet and create a new record in a table (one new record for each worksheet). Is there an easy way to do this other than pulling the data into a Crystal Reports pivot table or some such?
VBA for a click button that extracts specific fields in an Access DB in to an Excel spread sheet.
View 9 Replies View Related