Results 1 to 5 of 5
  1. #1
    markjkubicki's Avatar
    markjkubicki is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jul 2010
    Location
    Fire Island Pines, NY
    Posts
    496

    hiding a control box

    I have a form with a combobox that is not always visible; it is made visible when a user clicks a command button (otherwise, it is not necessary, and it's being visible would clutter the form's design...). once a value is selected, a subform is opened (with a different form for each of the combobox's values...) and concurrently, the combobox ought to be made visible = false

    however, it is not necessary for the user to select a value from the combobox (the command button may have been clicked in error, or the user may have changed their mind)

    where would I put a comand to return the visible value back to false?

    I thought it would have been On Lost Focus or On Exit; but neither of these seem to be right (?)


    also, when when the user has clicked on a different control on the form, signaling that they no longer have interest in the combobox, and I would presume have set focus elsewhere... either the Lost Focus event does not fire (the user may not have ever given the control focus), or I cannot set visible to false for a control that has focus (?)

    many thanks in advance,
    mark
    Last edited by June7; 07-09-2015 at 12:12 PM.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,526
    You could put a TOGGLE button.
    its. Button that stays in until pressed again.
    in.
    CboBtm.visible = TglBtn.value
    sub.visible= ...
    Last edited by June7; 07-09-2015 at 12:12 PM.

  3. #3
    knarfreppep is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Feb 2015
    Location
    Adelaide, Australia
    Posts
    106
    Have you considered using the form's OnTimer event?

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,960
    I say if the user is given the option to reveal the combobox and they do so inadvertently, then they have option to ignore it. First you give user some power and then you want to take it away. Either fully automate availability of the combobox or just put it there and educate users on its use. Conditional Formatting can manage if combobox is enabled or not (greyed out).

    Is the combobox really 'clutter' or is the button? Visible or not, the combobox still occupies space but the button is left visible all the time. That's two controls where there could be only one - always visible combobox.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    markjkubicki's Avatar
    markjkubicki is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jul 2010
    Location
    Fire Island Pines, NY
    Posts
    496

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

Similar Threads

  1. Replies: 3
    Last Post: 06-25-2013, 02:08 PM
  2. Hiding an error
    By dniezby in forum Programming
    Replies: 3
    Last Post: 05-22-2013, 01:26 PM
  3. Hiding a subreport
    By castufari in forum Reports
    Replies: 3
    Last Post: 11-23-2011, 08:21 PM
  4. Hiding toolbar?
    By BAX5127 in forum Access
    Replies: 2
    Last Post: 04-06-2011, 10:58 AM
  5. hiding forms
    By Halocarbon in forum Access
    Replies: 1
    Last Post: 12-09-2005, 09:51 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