access report export from vb6.0

B

bbxrider

from a vb program, i want to give user the functionality of exporting an
access report where they can choose the location and file type eg. .rtf

been trying to invoke the access preview with this but nothing comes up and
no error msg: (when using acNormal the report gets sent to default printer
ok)

strFilter = ""
strWhere = "dbVariable = somevalue"
objAccess.DoCmd.OpenReport "rptName", acPreview, strFilter, strWhere
While objAccess.SysCmd(acSysCmdGetObjectState, acReport, "voldatarpt1") =
acObjStateOpen
DoEvents
Wend

if i can't actually bring up the access preview or print window for the
report, i would do it 'silently' by separately obtaining the directory and
file type with vb input stuff but can't find in my access object the methods
for export/filetype/etc
 

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