Please i need some help. I packed a vb6 application for a client. the application given "run time error 13 type mismatch" then the application will end.This error occurs each time the client is to print a report.
However the same packaged application give on error in my computer (developer machine)
Below is my code.
Please help me with some ideas
Thanks
If DTPickfrom.Value > DTPickTo.Value Then
MsgBox "From date cannot be earlier than To date", vbCritical + vbInformation
DTPickfrom.SetFocus
Exit Sub
End If
With DataRpt
.Sections("section4").Controls("LblFrom").Caption = DTPickfrom.Value
.Sections("section4").Controls("Lblto").Caption = DTPickfrom.Value
.Sections("section4").Controls("Lblpat").Caption = LblOPD
.Sections("section4").Controls("LblFacility").Caption = AdodSetup.Recordset.Fields("Hfac")
' .Sections("section4").Controls("LblDist").Caption = AdodSetup.Recordset.Fields("Dist")
.Sections("section3").Controls("LblFHeadName").Caption = AdodSetup.Recordset.Fields("HfacHead")
End With
'çonnect to table
AdodDEL.RecordSource = "select * from DELIV_TBL where Period BETWEEN datevalue('" & DTPickfrom.Value & "') and datevalue('" & DTPickTo.Value & "')ORDER BY PERIOD"
AdodDEL.Refresh
If AdodDEL.Recordset.RecordCount = 0 Then
MsgBox "No Data For This Period", vbInformation + vbOKOnly, "Message"
Else
Set DataRpt.DataSource = AdodDEL.Recordset
DataRpt.Orientation = rptOrientLandscape
DataRpt.Show
Unload Me
End If
End Sub

New Topic/Question
Reply



MultiQuote



|