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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening Access DB from VB6 app and making it the active window...

Status
Not open for further replies.

HaworthBantam

Programmer
Jan 31, 2002
132
GB
Morning Folks,

I have a database (Remissions.mdb) on a server. I have another database (Reports.mdb) on the same server with linked tables to Remissions.mdb.

In a VB6.0 application I have a procedure, shown below, that opens Reports.mdb, asks for some information from the user and generates a report based on the data in Remissions.mdb.

The code to open Reports.mdb is.....

Public Sub ByRemissionDate()

'Create an instance of Access
Set acMyApp = New Access.Application

'Open the Access Database
acMyApp.OpenCurrentDatabase "U:\Remissions\Reports.mdb", False

'Run the RemissionsByDate() procedure within Reports.mdb
acMyApp.Run "RemissionsByDate"

End Sub

The code within the VB app runs, opens an instance of Reports.mdb and generates the report just fine.

My problem is that the instance of Access I'm generating sits on the task bar at the bottom of the screen and will only become the active window and maximise with user intervention.

Does anybody have any idea how I can automatically make the Access database maximised and the active window ?

Thanks.
 
Sorry CCLINT (I must be dim), but I can't work out how to get to that thread.
 
Click here (I had a space in there):
thread222-426238


> but I can't work out how to get to that thread.

You could change the URL in the address line to read:

SQID=426238&SPID=222

to get to it also
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top