how to lock a combo box in a form after selecting data

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • eilaw
    New Member
    • Aug 2023
    • 1

    how to lock a combo box in a form after selecting data

    i have form with a subform, in the main form i want to lock a specific combo box after entering/choosing data. I have tried locking it in on current but i locks all my record and i can't enter a new record. please help
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32661

    #2
    Hi eilaw.

    Welcome to Bytes.com.

    I'd like to help but my options are severely limited based on the lack of anything helpful in the question.

    So, I have no idea what you're actually doing, but hopefully I can point you to what you should be doing and that way you can compare that with what you are and spot the difference.

    The first thing you should be doing is to identify the point at which you want to lock access to the particular ComboBox control you're talking about. This may, and probably does, also require you to identify the point where access is re-enabled.

    Once you've done that, and that really should be the hardest part, then you set or clear the .Enabled or .Locked properties of the ComboBox control at those points. Which property you choose to use will be deteremined by exactly how you want it to behave. Setting .Enabled to False will not only stop any interaction with it, but also turn it grey. On the other hand setting .Locked to True will do exactly as expected and simply stop the operator from changing the value.

    PS. I highly recommend you visit How to ask "good" questions -- READ BEFORE SUBMITTING A QUESTION! before posting your next question.

    Comment

    Working...