Preview a Specific Report

  • Thread starter Thread starter Greg Ripper
  • Start date Start date
G

Greg Ripper

I am using this onclick event with and id field to get a report to preview.


Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "rptInfo"

stLinkCriteria = "[ID]=" & Me![ID]
DoCmd.OpenReport stDocName, , , acPreview

Can someone explain to me why this doesn't work? I get an error message:
A problem occurred when Access was communicating with the OLE Server.

What does that mean?

Thanks As Always,
Rip
 
-----Original Message-----

I am using this onclick event with and id field to get a report to preview.


Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "rptInfo"

stLinkCriteria = "[ID]=" & Me![ID]
DoCmd.OpenReport stDocName, , , acPreview

Can someone explain to me why this doesn't work? I get an error message:
A problem occurred when Access was communicating with the OLE Server.

What does that mean?

Thanks As Always,
Rip
.

try this
 
DoCmd.OpenReport stDocName, , , acPreview, stLinkCriteria



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

I am using this onclick event with and id field to get a report to preview.


Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "rptInfo"

stLinkCriteria = "[ID]=" & Me![ID]
DoCmd.OpenReport stDocName, , , acPreview

Can someone explain to me why this doesn't work? I get an error message:
A problem occurred when Access was communicating with the OLE Server.

What does that mean?

Thanks As Always,
Rip
.

try this
DoCmd.OpenReport "stDocName",acPreview, ,stLinkCriteria
 
Sorry it is :

DoCmd.OpenReport stDocName, acPreview, , stLinkCriteria


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

I am using this onclick event with and id field to get a report to preview.


Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "rptInfo"

stLinkCriteria = "[ID]=" & Me![ID]
DoCmd.OpenReport stDocName, , , acPreview

Can someone explain to me why this doesn't work? I get an error message:
A problem occurred when Access was communicating with the OLE Server.

What does that mean?

Thanks As Always,
Rip
.

try this
DoCmd.OpenReport "stDocName",acPreview, ,stLinkCriteria
 
Back
Top