Results 1 to 9 of 9
  1. #1
    DC CS is offline Advanced Beginner
    Windows 11 Office 365
    Join Date
    Jan 2023
    Location
    Vaalpark, South Africa
    Posts
    70

    Hide a form

    I have a form that detects idle time. This was adapted from a forum.
    The code when logging into the database, as follows:

    Code:
            DoCmd.Close acForm, "Frm_Logon", acSaveNo
            DoCmd.OpenForm "Frm_DetectIdleTime", , , , acHidden
            DoCmd.OpenForm "Main"
    When the "Main" form is opened, the "Frm_DetectIdleTime" is still visible and not hidden.



    Click image for larger version. 

Name:	Idletime form not hidden.JPG 
Views:	24 
Size:	10.0 KB 
ID:	51741
    Thanks

  2. #2
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,983
    This is what I get from intellisense in the immediate window?
    Code:
    docmd.OpenForm "Form1",,,,,acHidden
    acSaveNo is only if the form was opened in design mode.
    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

  3. #3
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2019
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    Quote Originally Posted by DC CS View Post
    I have a form that detects idle time. This was adapted from a forum.
    The code when logging into the database, as follows:

    Code:
            DoCmd.Close acForm, "Frm_Logon", acSaveNo
            DoCmd.OpenForm "Frm_DetectIdleTime", , , , acHidden
            DoCmd.OpenForm "Main"
    When the "Main" form is opened, the "Frm_DetectIdleTime" is still visible and not hidden.

    Click image for larger version. 

Name:	Idletime form not hidden.JPG 
Views:	24 
Size:	10.0 KB 
ID:	51741
    Thanks
    In case you haven't noticed, you have four commas in the following line but Welshgasman has five commas.
    DoCmd.OpenForm "Frm_DetectIdleTime", , , , acHidden
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  4. #4
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,983
    Quote Originally Posted by Bob Fitz View Post
    In case you haven't noticed, you have four commas in the following line but Welshgasman has five commas.
    DoCmd.OpenForm "Frm_DetectIdleTime", , , , acHidden
    Yes, and I just used intellisense, as I do not know what goes where.
    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

  5. #5
    DC CS is offline Advanced Beginner
    Windows 11 Office 365
    Join Date
    Jan 2023
    Location
    Vaalpark, South Africa
    Posts
    70
    Hi. You are correct. After using IntelliSense, I also had 5 commas and the form is hidden.

    Thanks

  6. #6
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,983
    Quote Originally Posted by DC CS View Post
    Hi. You are correct. After using IntelliSense, I also had 5 commas and the form is hidden.

    Thanks
    It is there for a reason. may as well use it.? I am not even sure how you can ignore it TBH, and why you would switch it off is beyond me.

    switch off intellisense access
    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

  7. #7
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,986
    I don't believe it is possible to switch off Intellisense in Access. It isn't wise even if it is possible
    If you know better, please tell me how you did it so I can advise others how to re-enable it in future
    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

  8. #8
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,983
    Colin, I would not do it, but I just googled as to how it might be done.
    So please try that link. I leave it to the o/p's to follow up

    Edit:
    Just tried it myself, deselect AutoList members

    Mind you I had to go and find this as something I would never do?
    Attached Thumbnails Attached Thumbnails intellisense.JPG  
    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

  9. #9
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,986
    Thanks Paul
    Just checked the help documents for VBE options: Options dialog box | Microsoft Learn

    Auto List Members: Displays a list that contains information that would logically complete the statement at the current insertion point.
    Not the most obvious way of saying - tick this to get intellisense. Untick to lose it!
    I can't think of any reason why anyone would ever want to disable this.
    However, I just tried disabling it and Intellisense is indeed immediately switched off. I've immediately enabled it again!

    Next time, someone tells me intellisense doesn't work I'll know what to tell them to enable it again
    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. How to hide the name of the form
    By atai in forum Forms
    Replies: 18
    Last Post: 04-04-2024, 06:51 AM
  2. Hide Value in Form Interface
    By Haleakala17 in forum Access
    Replies: 1
    Last Post: 12-06-2012, 07:43 PM
  3. Hide Form Name Tab
    By ruthib4 in forum Programming
    Replies: 4
    Last Post: 06-26-2012, 12:13 PM
  4. Replies: 3
    Last Post: 05-02-2012, 10:13 AM
  5. Hide form
    By jgelpi16 in forum Programming
    Replies: 2
    Last Post: 06-29-2011, 08:06 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