Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trying to print a jpeg from Access

Status
Not open for further replies.

rkinrade

Programmer
Feb 1, 2003
19
US
I have a VB application that prints a report from an Access Database. The only trouble I'm having is printing the CustSign field which is an OLE Object (a jpeg image of the Customer's signature). The report prints out beautifully, just without the signature. Here's the code. Thanks in advance.

Dim AA As Access.Application
Dim mcat As ADOX.Catalog
Dim mview As ADOX.View
Dim cmd As ADODB.Command
Set AA = New Access.Application
AA.OpenCurrentDatabase DBLocation

Set mcat = New ADOX.Catalog
Set mcat.ActiveConnection = db 'Database
Set mview = mcat.Views("heat")
Set cmd = mview.Command

cmd.CommandText = "SELECT CustNum,CustSign,CAddress,CCity,CState,CZip FROM Customers WHERE CustNum = '" & Text1.Text & "'"

Set mview.Command = cmd
Set mview = Nothing
Set cmd = Nothing
Set mcat = Nothing


If chkUpdate = 1 Then 'Print the report
AA.DoCmd.OpenReport "heat"
End If

AA.Quit
Set AA = Nothing
 
Oh, I feel so dumb... There is nothing wrong with the code. The Access Report was made up of labels and textboxes. All I had to do was place an imagebox for the jpeg to fill. I keep looking for the complicated whilst tripping over the simple. Yeesh!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top