Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How Can I completely hide Access so only my forms are visible

User Interface Techniques

How Can I completely hide Access so only my forms are visible

by  Chance1234  Posted    (Edited  )
Just came across this in my notes, Time has taken the better of them, so please any questions or improvements please feel free to contact me at Tektips at 5ylac dot biz

Create a New Database

Create a Form and change its pop up property to True
Create another form called frm_main, this is the form that you want to use.

Add the following code to the first form

Code:
Private Declare Function ShowWindow Lib "user32" _
  (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long






Private Sub Form_Open(Cancel As Integer)
  Call ShowWindow(hWndAccessApp, SW_HIDE)
  
   DoCmd.OpenForm "frm_main", windowmode:=acDialog
  
  
End Sub

Private Sub Form_Unload(Cancel As Integer)
Dim lngret As Long
  lngret = ShowWindow(hWndAccessApp, SW_MAXIMIZE)
End Sub

Change the start up properties of the database, to start up with your first form and Voila,

Access without urm Access.

Notes.
1. You Cant run reports
2. You need to put a application.close line in on your exit button otherwise Access will still be open if you just use the close form button.

Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top