Results 1 to 15 of 15
  1. #1
    Middlemarch is offline Competent Performer
    Windows 10 Access 2019
    Join Date
    Mar 2015
    Posts
    365

    Form behaviour

    I have a non-modal popup form on top of main form.
    If I click something on the main form the caption on the popup form greys out.


    Is that normal and can it be restored? Thanks.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,944
    Normal.
    Click back on the popup form.
    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.

  3. #3
    Middlemarch is offline Competent Performer
    Windows 10 Access 2019
    Join Date
    Mar 2015
    Posts
    365
    Yes I know, but how is that done in code so it's automatic

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,944
    If user has clicked on main form, what event do you suppose could be triggered? User can't really do anything on the main form.

    Maybe user should not be able to click on main form when popup is open. Maybe popup should be modal.
    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
    Middlemarch is offline Competent Performer
    Windows 10 Access 2019
    Join Date
    Mar 2015
    Posts
    365
    The main form changes what the Popup Form sees.
    That won't work if it's modal.

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,944
    If you want to allow user to click back onto main form and do something, then maybe popup shouldn't be set as Popup.

    What process are you trying to code?
    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.

  7. #7
    Middlemarch is offline Competent Performer
    Windows 10 Access 2019
    Join Date
    Mar 2015
    Posts
    365
    That's interesting, if it's not popup might that work? I'll try it.
    Normally only one item is displayed (in a text box). But if there's many a click in the textbox opens Form with a Listview.
    It displays a field from an mp3 ID3tag, where the filename(s) are read into an array. So nothing is bound.
    I did think about a listbox instead of a text box, and a drop down if items > 1. Now I'm not sure so will both, unless you have a recommendation.

  8. #8
    Middlemarch is offline Competent Performer
    Windows 10 Access 2019
    Join Date
    Mar 2015
    Posts
    365
    OK, removing Popup made it full screen and a mess.
    Now trying a listbox but finding it very difficult to assign the height properly. Can access not do that automatically ?
    I read a listbox scrollbar exists but not how to turn it on, and I'm not seeing it.
    Tried Google for this but while there's a lot there's nothing useful about height/scroll for value list I can find.

  9. #9
    davegri's Avatar
    davegri is online now Excess Access
    Windows 11 Access 2019
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,417
    No automatic height for listbox. Scroll bar will appear automatically when needed to see rows exceeding height.

  10. #10
    Middlemarch is offline Competent Performer
    Windows 10 Access 2019
    Join Date
    Mar 2015
    Posts
    365
    Thanks davegri. I do get a scrollbar now but would like to calculate a height (based on font size * number of items ??).
    So that >12 rows invoke a scrollbar. This was changed from a textbox and if one item, that's fine, the listview displays just like it. Otherwise I'm still mucking about trying to get it right.

    Would a combo box be easier to manage ?

  11. #11
    davegri's Avatar
    davegri is online now Excess Access
    Windows 11 Access 2019
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,417
    Advantage of listbox is that multiple rows can be selected. Combobox can do that too if evils of multi-value table fields are invoked.
    Yes you can, of course, calculate height of listbox.

  12. #12
    Middlemarch is offline Competent Performer
    Windows 10 Access 2019
    Join Date
    Mar 2015
    Posts
    365
    I'll check out a combo and pick whatever works best to display data.
    Re listbox, what's the formula to calculate height exactly? Can't find it on Google and trying different guesses.

  13. #13
    davegri's Avatar
    davegri is online now Excess Access
    Windows 11 Access 2019
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,417
    Quote Originally Posted by Middlemarch View Post
    I'll check out a combo and pick whatever works best to display data.
    Re listbox, what's the formula to calculate height exactly? Can't find it on Google and trying different guesses.
    While I asserted that the height could be calculated, I had no formula in mind. I would work it out via trial and error.

  14. #14
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,944
    Read and set listbox Height property in VBA as TWIPS. 1440 TWIPS per inch.
    Fonts are measured in points, approx 72 points per inch.
    https://fontsaga.com/font-size-chart-to-inches/
    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.

  15. #15
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,983
    Quote Originally Posted by Middlemarch View Post
    I'll check out a combo and pick whatever works best to display data.
    Re listbox, what's the formula to calculate height exactly? Can't find it on Google and trying different guesses.
    This article may help Accurately Move Forms & Controls (isladogs.co.uk)
    See sections on trips, pixels & points together with the use of the hidden Wizhook function to automatically calculate the height of each row depending on the font name, style & point size
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

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

Similar Threads

  1. Strange behaviour of MS Access form
    By selvakumar.arc in forum Forms
    Replies: 2
    Last Post: 08-15-2013, 12:07 AM
  2. Replies: 11
    Last Post: 05-23-2012, 08:42 AM
  3. Strange TableDef behaviour
    By tym in forum Access
    Replies: 12
    Last Post: 11-24-2011, 03:16 AM
  4. Weird subform behaviour
    By crispy-bacon in forum Forms
    Replies: 3
    Last Post: 06-16-2011, 02:31 PM
  5. Odd Form Behaviour
    By FrankHelbert in forum Access
    Replies: 1
    Last Post: 03-13-2010, 04:56 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