still chart
-
hi..i have still problem with chart,the problem how too generate graph from database,example access adhizz
hi Adhizzz. i hope this helps Print a Microsoft Access report from VB 6.0 As you may know, Microsoft Access provides a much more robust reporting system than Visual Basic. As a result, if you use Access as a back-end to your application, you may want to print Access reports from your VB application. Fortunately, you can do just that with Automation. The following code shows one way to do so, using late binding. remember to replace dbName and rptName with correct values: Dim objAccess As Object Private Sub Command1_Click() Dim dbName As String Dim rptName As String Dim Preview As Long Const acNormal = 0 Const acPreview = 2 dbName = "D:\PathToDB\db1.mdb" rptName = "MyReportName" Preview = acPreview 'acNormal With objAccess .OpenCurrentDatabase filepath:=dbName If Preview = acPreview Then .Visible = True .DoCmd.OpenReport rptName, Preview Else .DoCmd.OpenReport rptName End If End With End Sub Private Sub Form_Load() Set objAccess = CreateObject("Access.Application") End Sub Private Sub Form_Unload(Cancel As Integer) On Error Resume Next objAccess.Quit On Error GoTo 0 Set objAccess = Nothing End Sub
-
hi..i have still problem with chart,the problem how too generate graph from database,example access adhizz
hi Adhizzz. i hope this helps Print a Microsoft Access report from VB 6.0 As you may know, Microsoft Access provides a much more robust reporting system than Visual Basic. As a result, if you use Access as a back-end to your application, you may want to print Access reports from your VB application. Fortunately, you can do just that with Automation. The following code shows one way to do so, using late binding. remember to replace dbName and rptName with correct values: Dim objAccess As Object Private Sub Command1_Click() Dim dbName As String Dim rptName As String Dim Preview As Long Const acNormal = 0 Const acPreview = 2 dbName = "D:\PathToDB\db1.mdb" rptName = "MyReportName" Preview = acPreview 'acNormal With objAccess .OpenCurrentDatabase filepath:=dbName If Preview = acPreview Then .Visible = True .DoCmd.OpenReport rptName, Preview Else .DoCmd.OpenReport rptName End If End With End Sub Private Sub Form_Load() Set objAccess = CreateObject("Access.Application") End Sub Private Sub Form_Unload(Cancel As Integer) On Error Resume Next objAccess.Quit On Error GoTo 0 Set objAccess = Nothing End Sub :rose::rose: