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!

HELP!!How to view an Access Form during runtime

Status
Not open for further replies.

VB6User

Technical User
Aug 10, 2002
5
0
0
US
Does anyone know how to do this, to be able to open up a form created in Microsoft Access, in Visual Basic during runtime.

Please help!
 
Add a reference to the Microsoft Access x.x Runtime Library.

use this code

Code:
Dim accApp As Access.Application

Set accApp = New Access.Application

accApp.OpenCurrentDatabase ("Database path")
accApp.doCmd.OpenForm "formName"

be sure to do this somewhere too:
Code:
accApp.CloseCurrentDatabase
Set accApp = Nothing
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top