Results 1 to 5 of 5
  1. #1
    HansBades is offline Advanced Beginner
    Windows 10 Office 365
    Join Date
    Dec 2021
    Posts
    85

    Remove option after chosen on form


    I have a form where the user can designate the PM for a project. But once they choose the PM and click the submit button, I want that option to no longer be available. In other words, they can no longer change PM's once one is chosen, at least not from their access rights. I have code that sets the object's visible property to false after they select a PM. But when you close and reopen the form the object reappears. How can I make this so it can only be used once and then it disappears as an option for the users permanently? Thanks.

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,424
    no idea without know how your form works but best guess is you need some code in the current event to hide the control if a PM has already been selected

  3. #3
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,927
    Wouldn't be better to just lock it?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  4. #4
    Gicu's Avatar
    Gicu is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,115
    Maybe something like this in the Current event of the form (assumes the PM control is a combo box used to select the PM value):
    Code:
    Me.cboPM.Visible=IsNull(Me.cboPM)
    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  5. #5
    HansBades is offline Advanced Beginner
    Windows 10 Office 365
    Join Date
    Dec 2021
    Posts
    85
    That worked great. Thank you Gicu. I couldn't lock it for some other design reasons. But using the current event of the form did what I needed. Thank you all.

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

Similar Threads

  1. Replies: 7
    Last Post: 12-10-2021, 10:01 AM
  2. Replies: 13
    Last Post: 11-05-2020, 05:45 AM
  3. Replies: 3
    Last Post: 04-08-2018, 08:18 AM
  4. Replies: 1
    Last Post: 02-23-2012, 09:00 AM
  5. Replies: 1
    Last Post: 01-19-2012, 11:59 AM

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