Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access thread: DoCmd.OutputTo error


Message #1 by "Peter Duke" <peteydukie@y...> on Thu, 23 Aug 2001 23:36:15
I'm out putting a series of reports to word (thanks Roy for the tip) and 

everything works fine.  I would also like the word document to open after 

it is created.  The problem I get is that the control the hyperlink is 

attached to "is closed or does not exist" (error 2467).  Does anyone know 

how to fix this?



strDocName = Me.txtMemoID.Value

strLocation = "C:\Databases\Memos\" & strDocName & ".doc"

strFileName = strLocation

   

DoCmd.OutputTo acOutputReport, "rptMemo", acFormatRTF, strFileName



cmdNewMemo.HyperlinkAddress = strLocation
Message #2 by "Pardee, Roy E" <roy.e.pardee@l...> on Fri, 24 Aug 2001 07:13:23 -0700
I don't know from hyperlinks, but you may be able to use Shell() if you're

interested--e.g.



   Call Shell("WinWord.exe " & strLocation, vbMaximizedFocus)



HTH,



-Roy



-----Original Message-----

From: Peter Duke [mailto:peteydukie@y...]

Sent: Thursday, August 23, 2001 4:35 PM

To: Access

Subject: [access] DoCmd.OutputTo error





I'm out putting a series of reports to word (thanks Roy for the tip) and 

everything works fine.  I would also like the word document to open after 

it is created.  The problem I get is that the control the hyperlink is 

attached to "is closed or does not exist" (error 2467).  Does anyone know 

how to fix this?



strDocName = Me.txtMemoID.Value

strLocation = "C:\Databases\Memos\" & strDocName & ".doc"

strFileName = strLocation

   

DoCmd.OutputTo acOutputReport, "rptMemo", acFormatRTF, strFileName



cmdNewMemo.HyperlinkAddress = strLocation

Message #3 by "Peter Duke" <peteydukie@y...> on Mon, 27 Aug 2001 20:18:45
Thanks Roy, that worked like a charm





> I don't know from hyperlinks, but you may be able to use Shell() if 

you're

> interested--e.g.

> 

>    Call Shell("WinWord.exe " & strLocation, vbMaximizedFocus)

> 

> HTH,

> 

> -Roy

> 

> -----Original Message-----

> From: Peter Duke [mailto:peteydukie@y...]

> Sent: Thursday, August 23, 2001 4:35 PM

> To: Access

> Subject: [access] DoCmd.OutputTo error

> 

> 

> I'm out putting a series of reports to word (thanks Roy for the tip) and 

> everything works fine.  I would also like the word document to open 

after 

> it is created.  The problem I get is that the control the hyperlink is 

> attached to "is closed or does not exist" (error 2467).  Does anyone 

know 

> how to fix this?

> 

> strDocName = Me.txtMemoID.Value

> strLocation = "C:\Databases\Memos\" & strDocName & ".doc"

> strFileName = strLocation

>    

> DoCmd.OutputTo acOutputReport, "rptMemo", acFormatRTF, strFileName

> 

> cmdNewMemo.HyperlinkAddress = strLocation


  Return to Index