Results 1 to 7 of 7
  1. #1
    Dave14867's Avatar
    Dave14867 is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Nov 2016
    Location
    Upstate NY
    Posts
    376

    Allow data entry to a field on a form that doesn't allow edits?

    Hello all,



    I have an issue where I want to not allow edits on a form however I want to allow the user to be able to input a lot number in a combo box and search for that specific record. So far I haven't been able to do it, is there a way. The form is a copy of the Main input form I use to enter data, I then changed the properties of the form to not Allow Edits, not Allow Deletions & not Allow Additions. The idea is that users will be able to search for a record and look at the details but not be able to change any of the data in the record.

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    Quote Originally Posted by Dave14867 View Post
    Hello all,

    I have an issue where I want to not allow edits on a form however I want to allow the user to be able to input a lot number in a combo box and search for that specific record. So far I haven't been able to do it, is there a way. The form is a copy of the Main input form I use to enter data, I then changed the properties of the form to not Allow Edits, not Allow Deletions & not Allow Additions. The idea is that users will be able to search for a record and look at the details but not be able to change any of the data in the record.
    What happens after making an enter in the combo that searches for the required record then.
    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
    Dave14867's Avatar
    Dave14867 is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Nov 2016
    Location
    Upstate NY
    Posts
    376
    In the new form, it doesn't accept any input. In the original form (That I use to input the data) I put in a lot # like 123456, and it will go to that record.

  4. #4
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    Try this in the GotFocus event of the combo:

    Code:
    Me.AllowAdditions = True
    Me.AllowDeletions = True
    Me.AllowEdits = True
    And this in the AfterUpdate of the combo after the code that finds the required record:
    Code:
    Me.AllowAdditions = False
    Me.AllowDeletions = False
    Me.AllowEdits = False
    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
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,413
    As you have found, setting a form to not allow edits will also not allow combobox lookups.
    One fix would be to set all the bound controls to Enabled=No

  6. #6
    Dave14867's Avatar
    Dave14867 is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Nov 2016
    Location
    Upstate NY
    Posts
    376
    Bob,

    That worked, Thank You. I hadn't thought of that.

    Dave, I am sure your method would also work but I tried Bob's fix first so I am all set.

    Thanks so much.

  7. #7
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    Quote Originally Posted by Dave14867 View Post
    Bob,

    That worked, Thank You. I hadn't thought of that.

    Dave, I am sure your method would also work but I tried Bob's fix first so I am all set.

    Thanks so much.
    You're welcome. Glad to help if I can
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 14
    Last Post: 02-24-2017, 12:59 AM
  2. Replies: 3
    Last Post: 02-25-2015, 04:48 PM
  3. Replies: 3
    Last Post: 06-19-2013, 02:39 PM
  4. Replies: 4
    Last Post: 01-23-2011, 09:01 PM
  5. Can't get new field to show in my data entry form
    By Suzie in forum Database Design
    Replies: 19
    Last Post: 12-21-2009, 03:48 PM

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