Hi there.
I am making a little system that uses a database in access.
What I want to do is to generate a printed report in base of the information I get when I do a query.
I really will appreciate any help!!!
Thanks..
PacoL
Printable View
Hi there.
I am making a little system that uses a database in access.
What I want to do is to generate a printed report in base of the information I get when I do a query.
I really will appreciate any help!!!
Thanks..
PacoL
well, i suppose u could use Automation to create an access object and then take control by telling it to open a other programa nd eventually to print.
i can' t remember the Automation code for Access off the top of my head.. I might get back to u on that one.
...i think it goes something like this:
dim q
set q = CreateObject("[This is the bit i can't remember...]")
' and once u have contol of it u can do all sorts of stuff with the
' program such as:
q.visible = false
hope i helped,
well, u cant blame a man for hoping...
pegasus
this will open datareport1 and print it.
Cookie = DataReport1.PrintReport(True, rptRangeAllPages)
Here, this works for me.
Dim strDbName As String
Dim objAccess As Access.Application
Dim strReport As String
On Error GoTo loaderror
strDbName = strDbName & "\somedatabase.mdb"
Set objAccess = CreateObject("Access.Application")
With objAccess
.OpenCurrentDatabase filepath:=strDbName
.DoCmd.OpenReport ReportName:="rptName", _
view:=Access.acPreview
End With
Now, if someone can show me how to do this in a web app without using snapview I will be forever in your debt. (Of course I would rather owe you than cheat you out of it)
Thanks to everyone for the help.
I will try it and let you know if it worked for me.
PacoL
What's about the poor printer function ???
Printer.print "Hello World !"
Printer.enddoc
Aye Captain, Printer.PrintDoc has had to yield to a greater, and much more sophisticated, procedure. It can now be found on many of your finer 286's and 386's.