If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Open a form in hidden view
I'm trying to have data export whenever the database closes. After looking
around on this site and others, it seems like the best way to do this is to have a form open in the hidden mode when the Access database opens, and have this "invisible" form trigger the export when it's closed, which is when the database closes. I can't get the form to open in hidden mode, however. I use this code to call the function: Private Sub Form_Open(Cancel As Integer) Call Open_Form_Hidden End Sub The function called: Public Sub Open_Form_Hidden() DoCmd.OpenForm "Test", acNormal, , , , acHidden End Sub I've also tried changing the Visible property to false, but neither of these do what I need. Does anyone have a suggestion for me? Thanks, Sam |
#2
|
|||
|
|||
Open a form in hidden view
AFAIK, you can't hide a form once you've opened it: you need to open it
hidden. Either call Open_Form_Hidden from some other form, or use an AutoExec macro to open it when the application first opens. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no private e-mails, please) "Sam" wrote in message ... I'm trying to have data export whenever the database closes. After looking around on this site and others, it seems like the best way to do this is to have a form open in the hidden mode when the Access database opens, and have this "invisible" form trigger the export when it's closed, which is when the database closes. I can't get the form to open in hidden mode, however. I use this code to call the function: Private Sub Form_Open(Cancel As Integer) Call Open_Form_Hidden End Sub The function called: Public Sub Open_Form_Hidden() DoCmd.OpenForm "Test", acNormal, , , , acHidden End Sub I've also tried changing the Visible property to false, but neither of these do what I need. Does anyone have a suggestion for me? Thanks, Sam |
#3
|
|||
|
|||
Open a form in hidden view
Thanks! Using the AutoExec macro works perfectly.
"Douglas J. Steele" wrote: AFAIK, you can't hide a form once you've opened it: you need to open it hidden. Either call Open_Form_Hidden from some other form, or use an AutoExec macro to open it when the application first opens. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no private e-mails, please) "Sam" wrote in message ... I'm trying to have data export whenever the database closes. After looking around on this site and others, it seems like the best way to do this is to have a form open in the hidden mode when the Access database opens, and have this "invisible" form trigger the export when it's closed, which is when the database closes. I can't get the form to open in hidden mode, however. I use this code to call the function: Private Sub Form_Open(Cancel As Integer) Call Open_Form_Hidden End Sub The function called: Public Sub Open_Form_Hidden() DoCmd.OpenForm "Test", acNormal, , , , acHidden End Sub I've also tried changing the Visible property to false, but neither of these do what I need. Does anyone have a suggestion for me? Thanks, Sam |
Thread Tools | |
Display Modes | |
|
|