Run Time Error
-
2012年3月1日 15:21
Private Sub cmdPrint_Click()
Run Time Error: 2147467259(80004005)
Set obj = New PrinterControl
obj.ChngOrientationPortrait
Call ConnectMe
rs.Open "select customer.cusno,customer.fullname,customer.idcn,customer.mobie,customer.reg,customer.dateis,customer.email,sales.pron,sales.blono,sales.lano,sales.sql from customer INNER JOIN sales ON customer.idcn = sales.idcn where customer.idcn = " & txtCusC.Text & "", con, 1, 3
If rs.RecordCount = 0 Then
MsgBox "No record found on query.", vbCritical, "Medrar"
Else
Set SpCustomer.DataSource = rs
If IsNull(rs.Fields("CustomerPicture").Value) = False Then
ReDim bData(rs.Fields("CustomerPicture").ActualSize)
bData = rs.Fields("CustomerPicture").Value
szfile = App.Path & "\tempPic.tmp"
Open szfile For Binary Access Write As #1
Put #1, , bData
Close #1
Set SpCustomer.Sections("Section1").Controls("Img").Picture = LoadPicture(szfile)
End If
SpCustomer.Show
End If
Set rs = Nothing
End SubRasheed
- 已移动 Bob_BaoMVP 2012年3月12日 9:23 (From:Visual Basic Power Packs)
全部回复
-
2012年3月5日 6:24
Hi Rasheed,
Welcome to the MSDN forum.
I’d like to clarify if you’re using VB6. If so, I’d suggest you check this link about Where to post your VB 6 questions because this forum is talking about VB.NET.
If I misunderstood anything, please feel free and let me know.
Best regards,
Shanks Zen
MSDN Community Support | Feedback to us
- 已编辑 Shanks ZenMicrosoft Contingent Staff 2012年3月12日 9:23 typo

