Preview a Specific Report

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
 
G

Guest

-----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
 
B

Bruno Frisque

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
 
B

Bruno Frisque

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top