rickyoswald
Programmer
I wish to simply view a report I have made in access. Thus far I have:
Dim AccessApp As Access.Application
--------------------------------------------
Set AccessApp = New Access.Application
AccessApp.OpenCurrentDatabase (App.Path & "\AddressDatabase.mdb")
AccessApp.DoCmd.OpenReport "rptContacts"
AccessApp.Visible = True
For me this prompted a save of an MDI file which I saved (as default), then it opened the report in some wierd file viewer. When my friend used the same code it just printed the report off. I do not have a printer, I think .mdi file must be a print prieview file (confusingly named the same as an mdi form).
The code I had previously worked fine with Access97 databases but when I tried to run it with my Access2003 database it would open then close straight away without giving any errors.
Dim AccessApp As Access.Application
--------------------------------------------
Set AccessApp = New Access.Application
AccessApp.OpenCurrentDatabase (App.Path & "\AddressDatabase.mdb")
AccessApp.DoCmd.OpenReport "rptContacts"
AccessApp.Visible = True
For me this prompted a save of an MDI file which I saved (as default), then it opened the report in some wierd file viewer. When my friend used the same code it just printed the report off. I do not have a printer, I think .mdi file must be a print prieview file (confusingly named the same as an mdi form).
The code I had previously worked fine with Access97 databases but when I tried to run it with my Access2003 database it would open then close straight away without giving any errors.