Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 10th, 2005, 01:19 PM
Registered User
 
Join Date: Mar 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default user interface

How to have an Access GUI interface hidden during an application run-time? I want a user to be able to see only selected forms and windows and not realize that Access application is running.
 
Old March 10th, 2005, 03:14 PM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Hi,

   It sounds like you want VB.Net to make your Access interface. It is not much different than using Access VBA.

HTH


mmcdonal
 
Old March 10th, 2005, 07:47 PM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

You will need to write an SDI application to do that.

Access’ programming interface does not allow that. The data from the tables in an MDB can be accessed by an SDI app, but you cannot write an SDI app with just Access as your environment.

You could “fake it” by having a series of Access apps that all use just one form, maximized in the parent window, but sheesh!, what a nightmare [u]that</u> would be to write and maintain!
 
Old March 11th, 2005, 10:03 AM
Authorized User
 
Join Date: Mar 2004
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You could do what I do... have the Access (host window) re-size itself upon startup and then center itself on the user's screen. All of the forms (including switchboard) open as pop-ups over top of the "reduced" host window. User's never see it. They only see the forms.

Here's the code I use to re-size and position the "host" window.


Function SizeAccess(cX As Long, cy As Long, _
  cHeight As Long, cWidth As Long)
         Dim h As Long
         'Get handle to Microsoft Access.
         h = Application.hWndAccessApp
         'Position Microsoft Access.
         SetWindowPos h, HWND_TOP, cX, cy, cWidth, _
         cHeight, SWP_NOZORDER
End Function


Rick
 
Old March 13th, 2005, 12:27 PM
Authorized User
 
Join Date: Sep 2004
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Paulsh Send a message via Yahoo to Paulsh
Default

I tried the solution posted by Rick but came unstuck with the following:
        SetWindowPos h, HWND_TOP, cX, cy, cWidth, _
         cHeight, SWP_NOZORDER

SetWindowPos is undefined as its HWNF_TOP and SWP_NOZORDER?

Thanks

Paul
 
Old March 14th, 2005, 09:50 AM
Authorized User
 
Join Date: Mar 2004
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Sorry... I forgot to include very important step. In the Autoexec macro of your db, you'll want to add the following FUNCTION NAME reference: SizeAccess (450,355,25,160)

This should put the minimized "shell" window" right dead center of your screen so that forms open over top of it. You can play around with the numbers to get it where you want it.

Give it a try and let me know how you make out.

Rick
 
Old March 14th, 2005, 09:52 AM
Authorized User
 
Join Date: Mar 2004
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default

And you'll need the following declarations:

Declare Sub SetWindowPos Lib "user32" (ByVal hwnd&, _
                           ByVal hWndInsertAfter&, _
                           ByVal x&, ByVal Y&, ByVal cX&, _
                           ByVal cy&, ByVal wFlags&)
Declare Function FindWindow Lib "user32" Alias "FindWindowA" _
   (ByVal lpClassName As Any, ByVal lpWindowName As Any) As Long
'Moves MS Access window to top of Z-order.
Global Const HWND_TOP = 0
Global Const SWP_NOZORDER = &H4 'Ignores the hWndInsertAfter.


Rick





Similar Threads
Thread Thread Starter Forum Replies Last Post
Access Forms - Multiple User Interface nadhan_f BOOK: Access 2003 VBA Programmer's Reference 1 October 23rd, 2007 04:37 PM
Retreiving user interface parameter at runtime saeedahmed C# 0 November 7th, 2005 02:53 AM
how to show user interface data in crystal report sanjay_jadam Crystal Reports 1 May 26th, 2005 02:25 AM
Installation User Interface snowy0 VB.NET 2002/2003 Basics 0 October 8th, 2004 08:52 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.