Results 1 to 5 of 5
  1. #1
    recyan's Avatar
    recyan is offline Expert
    Windows 2K Access 2000
    Join Date
    Dec 2011
    Posts
    662

    Open a Form in Invisible mode on opening the db.

    Currently, I have set the Access Options -> Current Database -> Display Form: -> myForm.



    Is it possible to open a Form on opening a db in VBA ?

    The reason being, I would like to open this form in Invisible mode on opening the db application, with the user not being able to see it.

    Would like to avoid use of Macro.

    Thanks

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Options I am aware of:

    1. autoexec macro

    2. VBA in event procedure of another form
    DoCmd.OpenForm "form name", , , , , acHidden

    3. custom ribbon code can call VBA procedure in general module - example:

    following is VBA procedure
    Code:
    Sub OnRibbonLoad(ribbon As IRibbonUI)
        ' procedure called by custom ribbon code in QATRibbon record of USysRibbons table
        ' QATRibbon is set as the default ribbon when database opens
        DoCmd.OpenForm "Login"
    End Sub
    following is code in USysRibbons table
    Code:
    <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui" onLoad="OnRibbonLoad" >
      <commands>
        <command idMso="Help" enabled="false"/>
      </commands>
      <ribbon startFromScratch="true">
        <officeMenu>
          <button idMso="FileOpenDatabase" visible="false"/>
          <button idMso="FileNewDatabase" visible="false"/>
          <button idMso="FileCloseDatabase" visible="false"/>
        </officeMenu>
        <qat>
          <documentControls>
            <button idMso="DataRefreshAll"/>
          </documentControls>
        </qat>
      </ribbon>
    </customUI>
    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
    recyan's Avatar
    recyan is offline Expert
    Windows 2K Access 2000
    Join Date
    Dec 2011
    Posts
    662
    Thanks for the various options.
    1) Would like to avoid. Reason : Way back, after reading the opinions of many of my gurus in forums ( including you ), I came to the conclusion that I should avoid macros unless unavoidable. Today, I only have the conclusion with me & have forgotten the justifications. One of them could be that you cannot import macros in to another database. Please correct me if I am wrong.

    2) Not possible. Reason : As this is the first form that opens when the db is opened.

    3) This is a bit over my head at this time. Will try to analyse & see if I can incorporate. But at first glance, it appears to have opened new areas for me to explore & use.

    Thanks

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Macros can be imported, at least they are listed as an item in the import wizard. These are probably general macros that can be selected for import. I don't know if embedded or data macros will import with the objects they are associated with.

    Sources to learn about customizing ribbon.
    http://www.accessribbon.de/en/
    http://office.microsoft.com/en-us/ac...010211415.aspx
    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
    recyan's Avatar
    recyan is offline Expert
    Windows 2K Access 2000
    Join Date
    Dec 2011
    Posts
    662
    Sorry for the delayed response.
    Thanks for the links. Will take a look asap.

    Thanks

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

Similar Threads

  1. Opening a Form in Datasheet Mode.
    By Robeen in forum Forms
    Replies: 7
    Last Post: 11-19-2013, 04:03 PM
  2. Replies: 8
    Last Post: 05-06-2013, 03:14 AM
  3. Replies: 9
    Last Post: 10-17-2012, 11:37 AM
  4. Replies: 2
    Last Post: 09-01-2011, 10:48 PM
  5. Opening Saved data in form in Edit mode
    By l3111 in forum Forms
    Replies: 7
    Last Post: 06-06-2011, 11:37 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