PDA

View Full Version : Visual Basic 6 MsAccess-Crystal Report



shaukat
10-09-2016, 02:54 AM
Hello everyone
Iam very new to vb, wants to know,how to save & retrive an image or an image path to access table. Actually i am working on to print students id card using crystal report.

shaukat
10-09-2016, 03:45 AM
how to send sms using interne from pc to mobile

shaukat
10-09-2016, 04:05 AM
Object doesn't support this action (Error 445)

it works very fine once only, but second time gives error, when trying to access following code,

Dim db As CRAXDRT.Database
Dim Rs As New ADODB.Recordset
Dim WithEvents sect As CRAXDRT.Section
Public crx As New CRAXDRT.Application

Dim mRno As Integer


Private Sub Form_Load()
Screen.MousePointer = vbHourglass
Set rpt = crx.OpenReport(App.Path & "\Rpts\Report4.rpt ")
Set db = rpt.Database
Set sect = rpt.Sections("Section5")
Rs.Open "SELECT * FROM prntid", myCn, 1, 1
rpt.Database.SetDataSource Rs, 3, 1
CRViewer1.EnableRefreshButton = False
CRViewer1.ReportSource = rpt
CRViewer1.ViewReport
CRViewer1.Zoom 1
Screen.MousePointer = vbDefault
End Sub

SamT
10-09-2016, 07:24 AM
This is three threads merged into one by Moderator.
Thread moved to Access Folder by Moderator.



I think: Put that code into

Private Sub UserForm_Initialize().
Screen.MousePointer = vbHourglass
Set rpt = crx.OpenReport(App.Path & "\Rpts\Report4.rpt ")
Set db = rpt.Database
Set sect = rpt.Sections("Section5")

Rs.Open "SELECT * FROM prntid", myCn, 1, 1
rpt.Database.SetDataSource Rs, 3, 1

CRViewer1.EnableRefreshButton = False
CRViewer1.ReportSource = rpt
CRViewer1.ViewReport
CRViewer1.Zoom 1

Screen.MousePointer = vbDefault
End Sub



WAIT! Are you using Visual Basic 6 Studio? Or VBA for Access to program this code?

shaukat
10-11-2016, 03:34 AM
Hi SamT

thnx, working in vb 6.0 Studio, and i dont think there is ..
Private Sub UserForm_Initialize().

SamT
10-11-2016, 06:20 AM
bump

jonh
10-11-2016, 03:16 PM
Telling us what the error is and where it occurs could be helpful.

If if works once only, make sure you aren't trying to open something that's already open.

shaukat
10-13-2016, 11:53 AM
Hi guys...sorry for dealy… I am too late, was finishin a project...

thnx jonh, i think u r very correct... i did it

thnx SamT and jonh

shaukat
10-13-2016, 12:01 PM
can u pepole help me How to send SMS from PC using gsm Mobil or from Interne... any API to use, how to configure hardware... plz keep in mind i am working with visual stuodio (Visual Basic 6.0), i'll very oblige..