Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    Loup is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Apr 2017
    Posts
    7

    Locking Fields on a Table on a Form


    Hi all

    I have created a form that is displaying a table, I would like to lock some fields on the form so users can only change certain fields if anyone knows how to do this I would really appreciate the help.

    Regards
    Loup

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2013
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,543
    Tables have fields. Forms have controls. The controls on a form have a property called Enabled and another called Locked which can be used to achieve what you want
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    Loup is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Apr 2017
    Posts
    7
    Thanks heaps for the reply but I do not understand your answer, I need to have some fields editable and others not and when I go into design view I cannot get a property sheet for the fields in the table.

  4. #4
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2013
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,543
    The properties are for controls on a form
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  5. #5
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,800
    There is of course, a property sheet for table fields, but I think the answer was meant to infer that you need the property sheet for the form. There are several ways to activate or show it. Ribbon, Design tab, Tools section - or alt+enter when the form is in design view. I suspect that you might next post back saying that you want these controls disabled some times and not others, depending on some factor such as who's looking at it, or for certain records. Disabled greys out the control while locked is not so obvious to the user.
    Last edited by Micron; 04-30-2017 at 03:06 PM. Reason: clarification
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  6. #6
    Loup is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Apr 2017
    Posts
    7
    Yes that's fine but I need to control individual fields not just all of them, I already know how to control whether or not the table can be edited I need to manage individual fields.

    Click image for larger version. 

Name:	Capture.jpg 
Views:	23 
Size:	58.9 KB 
ID:	28467

  7. #7
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2013
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,543
    Quote Originally Posted by Loup View Post
    Yes that's fine but I need to control individual fields not just all of them, I already know how to control whether or not the table can be edited I need to manage individual fields.
    Do you mean that you need to make a control on the form editable for some records but not for other records
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  8. #8
    Loup is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Apr 2017
    Posts
    7
    Ok, so this is the problem say I have four fields, NUMBER, DESCRIPTION, COMPLETION DATE and TEST DATE. I would like to display this table in a form so that when users open it, it is in form mode, in this mode I would like them to be able to edit COMPLETION DATE and TEST DATE but none of the other fields. When I go into design mode on the form I cannot edit the properties or controls or whatever to allow individual fields to be locked or not, only the properties/controls of the nested table itself can be changed, therefore I cannot set this up. Once I know how to do this I will create different forms with passwords to allow other users to have more or less access to edit certain fields.

  9. #9
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,800
    Bob, I think this is a subform on a form situation...
    only the properties/controls of the nested table
    Also, look at the image, selection type.

  10. #10
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2013
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,543
    Thanks Micron. I think you may be right. I'll leave you with this one as you seam to be "in tune" with the OP's choice of terminology.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  11. #11
    Loup is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Apr 2017
    Posts
    7
    Thanks for the assistance. I know this isn't straightforward.

  12. #12
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,800
    Quote Originally Posted by Loup View Post
    Thanks for the assistance. I know this isn't straightforward.
    The thing is, it is quite straight forward and simple as long as we understand what you really mean.

    Forms don't have nested tables. In fact, they don't hold any kind of table. I know this might seem like nitpicking, but Bob's and my comments on this are intended to help you help us. A form contains controls that display data - usually from a table, but the data can come from a query or far less common, a recordset. If a form contains a subform control, that control displays another form, not another table.

    Either open the main form and click once on a subform control edge then right click on that and choose "Subform in new window", OR open the subform itself directly. The former way will allow you to open the main form in form view when you're finished with any design changes and that will load the subform as it normally does. Otherwise if you open the subform independently, you will likely generate an error message if you try to put the main form in form view when the subform is still open in another view.

    Then choose the controls you wish to disable. In your posted image, you have activated the subform control and circled properties for that, not for controls on the subform itself. If I'm all wrong about this stuff, then I don't really understand what you're dealing with. You'll have to be more specific, which I know can be difficult if you don't know the terminology.

  13. #13
    Loup is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Apr 2017
    Posts
    7
    Ok thanks and sorry if my terminology is confusing, what I am trying to do is use a form to display a table and then using that form only allow certain fields to be edited this would apply to all records. The screenshots below should help you understand how I have the objects set up.

    Click image for larger version. 

Name:	Capture.jpg 
Views:	23 
Size:	241.4 KB 
ID:	28468Click image for larger version. 

Name:	Capture1.jpg 
Views:	23 
Size:	93.5 KB 
ID:	28469

  14. #14
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,800
    Maybe you'll have to compact/repair then create a zipped copy of your db. I only see 1 form in the nav pane, yet your image shows you have activated a subform control (look at what follows "Selection Type" under the title Property Sheet - it reads Subform/Subreport. This is what has been selected. The only other thing I can imagine is that you only have one control on your form and it is a subform control, which would be totally wrong based on what you've posted. Not sure because there is a vertical menu bar on the right side of your form, and there is a lot of space below the slider, which could mean there are controls I can't see. If there are, the ones you want to disable are the ones you should be selecting, not the subform control. Aside from posting your db, you could also start over and build the form based on the table by using the form wizard.

  15. #15
    Loup is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Apr 2017
    Posts
    7
    All I did was create a blank form then drag the table onto it. I cannot use the wizard because I really need it to be displayed in a familiar format and searchable, so it appears like a spreadsheet. I want to use access because I will be able to add more functionality and manipulate the date more easily going forward. Perhaps access lacks a straightforward way to do this and I may need to start asking about VB code.

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Locking Fields
    By JulieAHop in forum Programming
    Replies: 2
    Last Post: 02-11-2017, 01:15 AM
  2. Locking and graying out fields in Access
    By ZandyRox in forum Forms
    Replies: 3
    Last Post: 08-16-2014, 08:15 AM
  3. Replies: 3
    Last Post: 11-01-2013, 10:16 AM
  4. Locking fields in Access form
    By sk88 in forum Access
    Replies: 10
    Last Post: 06-04-2012, 01:40 PM
  5. Locking fields
    By Icewolf0927 in forum Forms
    Replies: 3
    Last Post: 09-23-2010, 12:01 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums