Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    Jun 2001
    Posts
    531
    Thanks
    0
    Thanked 0 Times in 0 Posts

    how to search on a disabled/locked control (97)

    I have a form & used a wizard to install a search feature for it. A very important control on the form would most likely be the first criteria searched but I

  2. #2
    Star Lounger
    Join Date
    Apr 2002
    Posts
    58
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: how to search on a disabled/locked control (97)

    Try using the OnFilter event for the form to unlock/enable the control. It would be a few simple lines of code something like:

    txtSSN.Enabled = True
    txtSSN.Locked = False

    Then use the OnApplyFilter event to reset the lock.

    txtSSN.Enabled = False
    txtSSN.Locked = True

  3. #3
    4 Star Lounger
    Join Date
    Jun 2001
    Posts
    531
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: how to search on a disabled/locked control (97)

    I did the following code in the click event of my search button, let me know if this is ok as it is essentially giving me the result I want.

    Me.txtReferenceNumber.Enabled = True
    Me.txtReferenceNumber.Locked = False

    DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70

    Me.txtReferenceNumber.Enabled = False
    Me.txtReferenceNumber.Locked = True

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •