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

Open Access From VB

Status
Not open for further replies.

vicky666

Programmer
Feb 13, 2003
22
0
0
GB
I want to open an access database from within visual basic, the code below seems to open access and then shuts it again, any ideas?Could something be running in the background that is conflicting with the code?
This is driving me mad :)


Dim appAccess As Access.Application
Dim strDB As String

strDB = "C:\Documents And Settings\Administrator\Desktop\UMS\AdReal.mdb"
Set appAccess = GetObject(strDB)

appAccess.Visible = True
 
Hi Vicky - 'sme again

Just in case you miss the other post: change your code to

Code:
Dim appAccess As Access.Application
Dim strDB As String

strDB = "C:\Documents And Settings\Administrator\Desktop\UMS\AdReal.mdb"
Set appAccess = GetObject(strDB)

appAccess.Visible = True
appAccess.UserControl = True

Cheers
Nikki

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top