access reports with vb6.0

B

bbxrider

vb6.0/ access 2000
from a vb .frm i can easily send an access report to a default printer with
objAccess.DoCmd.OpenReport "RptName", acNormal

is it possible to invoke the 'full' access preview and/or print report
functionality
where i can obtain a directory location and file type using vb input schemes
like textboxes or whatever
and then pass that to access to duplicate the file/export functionality

been going thru the obj browser in vb to look for export, etc but doesn't
seem to be there

also even when trying the above code with acPreview instead of acNormal
there is no
error but nothing happens either
 
S

SA

To support acPreview, you've goto to add a looping pause in your code to
cause it not to immediately exit once the preview is invoked as in:

objAccess.DoCmd.OpenReport "MyReport", acViewPreview
While objAccess.SysCmd(acSysCmd, _
GetObjectState, acReport, "MyReport") = acObjStateOpen
DoEvents
Wend
objAccess.Quit
--
Steve Arbaugh
ACG Soft
http://ourworld.compuserve.com/homepages/attac-cg

Most of the Access menu items (such as Export) are part of the
DoCmd.RunCommand methods.
 
B

bbxrider

thanks i'll be trying that
SA said:
To support acPreview, you've goto to add a looping pause in your code to
cause it not to immediately exit once the preview is invoked as in:

objAccess.DoCmd.OpenReport "MyReport", acViewPreview
While objAccess.SysCmd(acSysCmd, _
GetObjectState, acReport, "MyReport") = acObjStateOpen
DoEvents
Wend
objAccess.Quit
--
Steve Arbaugh
ACG Soft
http://ourworld.compuserve.com/homepages/attac-cg

Most of the Access menu items (such as Export) are part of the
DoCmd.RunCommand methods.
 
B

bbxrider

this code doesn't work
If IsMissing(intDisplay) Then intDisplay = acPreview
If IsMissing(strFilter) Then strFilter = ""
If IsMissing(strWhere) Then strWhere = ""
objAccess.DoCmd.OpenReport strRptName, intDisplay, strFilter, _
strWhere
While objAccess.SysCmd(acSysCmdGetObjectState, acReport, "voldatarpt1") =
acObjStateOpen
DoEvents
Wend
again nothing happens and no error message either
 

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