Welcome to dbFreaks.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Access 2002 Automation problem with OpenReport

 
   Database Help (Home) -> Visual Basic RSS
Next:  setcookie  
Author Message
ppuckett

External


Since: Jan 14, 2005
Posts: 2



(Msg. 1) Posted: Mon Feb 07, 2005 3:05 pm
Post subject: Access 2002 Automation problem with OpenReport
Archived from groups: microsoft>public>vb>database (more info?)

My VB 6 application needs to print a report in an Access 2002 database.
This was working fine when I used Access 97 but now the application
quits without any errors on the DoCmd.OpenReport line. I have my VB
application references set to access 10.0. Without any errors I cannot
figure it out. I have been working with this for at least 2 weeks.

On Error GoTo Print_Err
Set MSaccess = GetObject(FileName)
MSaccess.Visible = True
' ****** Bombs on next statement
MSaccess.DoCmd.OpenReport RptName, acNormal
MsgBox "Please wait while report prints", vbOKOnly
MSaccess.Quit

Any ideas? I need help. Thx!

 >> Stay informed about: Access 2002 Automation problem with OpenReport 
Back to top
Login to vote
Douglas J. Steele

External


Since: Mar 14, 2004
Posts: 1626



(Msg. 2) Posted: Tue Feb 08, 2005 8:22 pm
Post subject: Re: Access 2002 Automation problem with OpenReport [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

See whether <a style='text-decoration: underline;' href="http://support.microsoft.com/?id=296586" target="_blank">http://support.microsoft.com/?id=296586</a> helps.

--
Doug Steele, Microsoft Access MVP
<a style='text-decoration: underline;' href="http://I.Am/DougSteele" target="_blank">http://I.Am/DougSteele</a>
(no e-mails, please!)



"Pat" <ppuckett.RemoveThis@lortobco.com> wrote in message
news:1107813930.838367.94030@o13g2000cwo.googlegroups.com...
 > My VB 6 application needs to print a report in an Access 2002 database.
 > This was working fine when I used Access 97 but now the application
 > quits without any errors on the DoCmd.OpenReport line. I have my VB
 > application references set to access 10.0. Without any errors I cannot
 > figure it out. I have been working with this for at least 2 weeks.
 >
 > On Error GoTo Print_Err
 > Set MSaccess = GetObject(FileName)
 > MSaccess.Visible = True
 > ' ****** Bombs on next statement
 > MSaccess.DoCmd.OpenReport RptName, acNormal
 > MsgBox "Please wait while report prints", vbOKOnly
 > MSaccess.Quit
 >
 > Any ideas? I need help. Thx!
 ><!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: Access 2002 Automation problem with OpenReport 
Back to top
Login to vote
ppuckett

External


Since: Jan 14, 2005
Posts: 2



(Msg. 3) Posted: Wed Feb 09, 2005 11:36 am
Post subject: Re: Access 2002 Automation problem with OpenReport [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I have used that very document to code this. I did use GetObject since
Access was running instead of the CreateObject so I would not open
another instance of Access. I don't understand why the app quits
without going to the Error routine. It quits and leaves the instance
of Access open.
 >> Stay informed about: Access 2002 Automation problem with OpenReport 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
DMO - detachDB problem - I have the following code: Set oServer = New SQLDMO.SQLServer oServer.Connect (Servername), ServerID, ServerPwd Set oDatabase = oServer("Master") Call oServer.DetachDB(DBName, True) oServer.Close however, I continue getting the following err...

connected to mySQL using RDO,having a problem, - I have a problem,I have connected to mySql successfully. My problem is for example, when you log in it runs through this code fine and I get the correct results but....then when i log off and i log back in i get an error saying "Object invalid or no...

Getting at access feilds indirectly - Hi, I'm trying to build a generic routine that will load a combobox from a table: Public Sub Load_Class(InCntl As ComboBox, s_Table As String, s_Item_Name As String, s_Index_Name As String) Dim ss_Temp As Recordset On Error GoTo 0 If Not..

Cannot Delete Pocket Access File - I'm creating a Pocket Access file (via an EVB application) on a mobile device running PPC 2002. When the user logs off the EVB application, I want to delete the Access file (stored in the /Temp folder). However, I am unable to do this because the..

sql query returns in wrong format - Hi, Hope someone can help me with this. I have MS SQL 2000 database where i have Table "PriceList" and there a column "Pricemk" wich is data type "money". All data in this column is in form "10001,35". So why when...
   Database Help (Home) -> Visual Basic All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]