Click here to Skip to main content
16,007,814 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionHow to create a monitor Adjust brightness using track bar w/ on / off Pin
Member 1312882114-Apr-17 8:28
Member 1312882114-Apr-17 8:28 
GeneralRe: How to create a monitor Adjust brightness using track bar w/ on / off Pin
Ralf Meier14-Apr-17 23:32
mveRalf Meier14-Apr-17 23:32 
QuestionPicture box doubt Pin
Member 1267792613-Apr-17 4:24
Member 1267792613-Apr-17 4:24 
AnswerRe: Picture box doubt Pin
Richard MacCutchan13-Apr-17 4:43
mveRichard MacCutchan13-Apr-17 4:43 
Generalhow to create a 3d form and button Pin
Member 1311940712-Apr-17 12:33
Member 1311940712-Apr-17 12:33 
GeneralRe: how to create a 3d form and button Pin
Dave Kreskowiak12-Apr-17 16:55
mveDave Kreskowiak12-Apr-17 16:55 
GeneralHow to restrict label as an output to take 3 decimal place Pin
Member 1311940712-Apr-17 12:29
Member 1311940712-Apr-17 12:29 
GeneralRe: How to restrict label as an output to take 3 decimal place Pin
Dave Kreskowiak12-Apr-17 17:02
mveDave Kreskowiak12-Apr-17 17:02 
AnswerRe: How to restrict label as an output to take 3 decimal place Pin
Ralf Meier13-Apr-17 2:04
mveRalf Meier13-Apr-17 2:04 
QuestionConnection String Hash Pin
911911099-Apr-17 21:00
911911099-Apr-17 21:00 
AnswerRe: Connection String Hash Pin
Midi_Mick9-Apr-17 21:19
professionalMidi_Mick9-Apr-17 21:19 
GeneralRe: Connection String Hash Pin
911911099-Apr-17 21:22
911911099-Apr-17 21:22 
GeneralRe: Connection String Hash Pin
Richard MacCutchan9-Apr-17 21:46
mveRichard MacCutchan9-Apr-17 21:46 
GeneralRe: Connection String Hash Pin
911911099-Apr-17 21:55
911911099-Apr-17 21:55 
GeneralRe: Connection String Hash Pin
Richard MacCutchan9-Apr-17 22:10
mveRichard MacCutchan9-Apr-17 22:10 
GeneralRe: Connection String Hash Pin
Dave Kreskowiak10-Apr-17 2:43
mveDave Kreskowiak10-Apr-17 2:43 
Questionvb.net report card generation Pin
Member 131142067-Apr-17 19:38
Member 131142067-Apr-17 19:38 
AnswerRe: vb.net report card generation Pin
Richard MacCutchan7-Apr-17 21:34
mveRichard MacCutchan7-Apr-17 21:34 
Questionvb6 crystal report- subreport Pin
hoomi_ghost7-Apr-17 4:17
hoomi_ghost7-Apr-17 4:17 
how create subreport with crystalReports in vb6 and access db=?
in my code i have error logon failed
please help me ,thanks

my code:

Private Sub lvButtons_H6_Click()

Dim Rs As New ADODB.Recordset

If Rs.State = 1 Then Rs.Close

' If Rs.State = 1 Then Rs.Close

If StrSQL = "" Then

Rs.Open "SELECT ID,GroupName,Fname,LName FROM tblMain ORDER BY ID ASC", Conn, adOpenStatic, adLockOptimistic

Else
On Error Resume Next
Rs.Open StrSQL, Conn, adOpenStatic, adLockOptimistic

End If

StrSQLPrint = Rs.Source
Set Me.VS.DataSource = Rs
PrintMember StrSQLPrint
End Sub

Private Sub PrintMember(StrSQL As String)
'On Error GoTo E_R



Dim Rs As New ADODB.Recordset
'Dim ObjApp As New CRAXDRT.Application
'Dim ObjRpt As New CRAXDRT.report
'Dim crDBTab As CRAXDRT.DatabaseTable

If Rs.State = 1 Then Rs.Close
'MsgBox StrSQL, vbCritical
Rs.Open StrSQL, Conn

Dim CrxApp As CRAXDRT.Application
Dim CrxRep As CRAXDRT.report
Dim crxSubreport As CRAXDRT.report
Dim crxSubreportObject As SubreportObject
Dim crxDatabase As CRAXDRT.Database
Dim crxDatabaseTables As CRAXDRT.DatabaseTables
Dim crxDatabaseTable As CRAXDRT.DatabaseTable
Dim crxSections As CRAXDRT.Sections
Dim crxSection As CRAXDRT.Section
Dim CRXReportObject As Object

Set CrxApp = New CRAXDRT.Application
Set CrxRep = CrxApp.OpenReport(App.Path & "\Reports\R.rpt")
CrxRep.Database.SetDataSource Rs

Set crxSections = CrxRep.Sections

For Each crxSection In crxSections
For Each CRXReportObject In crxSection.ReportObjects
If CRXReportObject.Kind = crSubreportObject Then
Set crxSubreportObject = CRXReportObject
Set crxSubreport = crxSubreportObject.OpenSubreport
Set crxDatabase = crxSubreport.Database
Set crxDatabaseTables = crxDatabase.Tables

For Each crxDatabaseTable In crxDatabaseTables

crxDatabaseTable.Location = App.Path & "\Database.mdb"


crxDatabaseTable.SetLogOnInfo "Local", "Database.mdb", "Admin", "123456"
Next

Set crxSubreport = Nothing
End If
Next
Next

Frm_Preview.CR.ReportSource = CrxRep
Frm_Preview.CR.ViewReport
Frm_Preview.Show vbModeless, MainForm

Set crxDatabase = Nothing
Set crxDatabaseTable = Nothing
Set crxDatabaseTables = Nothing
Set crxSections = Nothing
Set crxSection = Nothing
Set crxSubreportObject = Nothing
Set crxReport = Nothing
Set crxApplication = Nothing
End sub

modified 7-Apr-17 19:09pm.

AnswerRe: vb6 crystal report- subreport Pin
Richard Deeming7-Apr-17 4:22
mveRichard Deeming7-Apr-17 4:22 
GeneralRe: vb6 crystal report- subreport Pin
hoomi_ghost7-Apr-17 13:15
hoomi_ghost7-Apr-17 13:15 
AnswerRe: vb6 crystal report- subreport Pin
CHill607-Apr-17 4:57
mveCHill607-Apr-17 4:57 
AnswerRe: vb6 crystal report- subreport Pin
Dave Kreskowiak7-Apr-17 8:22
mveDave Kreskowiak7-Apr-17 8:22 
Questionsort element of sting in alphabetically order Pin
Member 131073484-Apr-17 23:28
Member 131073484-Apr-17 23:28 
SuggestionRe: sort element of sting in alphabetically order Pin
Jochen Arndt5-Apr-17 0:12
professionalJochen Arndt5-Apr-17 0:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.