I have used these following pieces of code to open up documents from our intranet but not within the browser with the application they were written. e.g open a word document in the app word not within IE.
The code for Excel is:
Sub cmdorders_OnClick
Set objXL = CreateObject("EXCEL.application"
objXL.Visible = True
' ADD a workbook
objXL.WorkBooks.Open("H:\USERS\FIN_BELITD\Purchase Orders\ITorders.xls"
End Sub
The code for Word is:
Sub cmdword1_OnClick
Set objword = CreateObject("WORD.application"
objword.Visible = True
' Open .doc
objword.Documents.Open("H:\USERS\FIN_BELITD\Purchase Orders\ITorders.doc"
End Sub
What i want to know is how do i do the same for an access database?? I have tried the following code:
Sub cmdhardware_OnClick
Set objACC = CreateObject("ACCESS.application"
objACC.Visible = True
' Open a db
objACC.databases.Open("H:\GRPAPPS\Hardware\db1.mdb"
End Sub
This works up until 'objACC.databases.open' i have guessed with this and have tried a couple of variations with the 'databases' part what is the correct name you put here??? or am i completely on the wrong track? Any suggestions would be greatly appreciated!
The code for Excel is:
Sub cmdorders_OnClick
Set objXL = CreateObject("EXCEL.application"
objXL.Visible = True
' ADD a workbook
objXL.WorkBooks.Open("H:\USERS\FIN_BELITD\Purchase Orders\ITorders.xls"
End Sub
The code for Word is:
Sub cmdword1_OnClick
Set objword = CreateObject("WORD.application"
objword.Visible = True
' Open .doc
objword.Documents.Open("H:\USERS\FIN_BELITD\Purchase Orders\ITorders.doc"
End Sub
What i want to know is how do i do the same for an access database?? I have tried the following code:
Sub cmdhardware_OnClick
Set objACC = CreateObject("ACCESS.application"
objACC.Visible = True
' Open a db
objACC.databases.Open("H:\GRPAPPS\Hardware\db1.mdb"
End Sub
This works up until 'objACC.databases.open' i have guessed with this and have tried a couple of variations with the 'databases' part what is the correct name you put here??? or am i completely on the wrong track? Any suggestions would be greatly appreciated!