Guest_imported
New member
- Jan 1, 1970
- 0
Anyone can help me figuring out what this modul is all about? (( Case "Ausgabe_Projekt"
)I´m new to this VBA.I don´t understand -->> Set rs2 = db.OpenRecordset("Auswahl_mehrere_Projekte", dbOpenTable)....what does it mean by dbOpentable? Is it refering to a table that´s already exist?
And also-->> 'new Report: Set rep
= New Report_Ausgabe_Projekt.....what is it by this command?
theoritically this modul is a choice what will happen according to the case. By Case "Ausgabe_Projekt" a report should be displyed. It is also possible if a user choose to view another report after ther first is displayed.And so on. It should also be possible to print all the report,the first,the second,the third..and so on...each report consists of several pages.But this modul doesn´t function.It will only print the first report. Can anyone help me?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Private Sub auswahl_Click()
Dim rep() As Report
Dim countt As Long
Select Case OpenArgs
Case "Eingabe", "Import"
.....
.....
...
Case "Ausgabe_Projekt"
Set rs2 = db.OpenRecordset("Auswahl_mehrere_Projekte", dbOpenTable)
countt = rs2.RecordCount
ReDim rep(1 To countt)
n = 1
Do
If rs.RecordCount = 0 Then
rs.AddNew
Else
rs.MoveFirst
rs.Edit
End If
'make a copy:
rs![project_unit_name] = rs2![project_unit_name]
rs![pgid] = rs2![pgid]
rs![pgdeep] = rs2![pgdeep]
rs![pid] = rs2![pid]
rs![pdeep] = rs2![pdeep]
rs![uid] = rs2![uid]
rs.Update
'new Report:
Set rep
= New Report_Ausgabe_Projekt
rep
.Visible = True
rs2.MoveNext
n = n + 1
Loop Until (n > countt) Or (rs2.EOF = True)
rs2.Close
rs.Close
db.Close
DoCmd.Close acForm, "Auswahl_Projekt", acSaveNo
DoCmd.RunCommand acCmdTileVertically
Case “Bla bla bla”
......
......
......
End Select
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

And also-->> 'new Report: Set rep

theoritically this modul is a choice what will happen according to the case. By Case "Ausgabe_Projekt" a report should be displyed. It is also possible if a user choose to view another report after ther first is displayed.And so on. It should also be possible to print all the report,the first,the second,the third..and so on...each report consists of several pages.But this modul doesn´t function.It will only print the first report. Can anyone help me?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Private Sub auswahl_Click()
Dim rep() As Report
Dim countt As Long
Select Case OpenArgs
Case "Eingabe", "Import"
.....
.....
...
Case "Ausgabe_Projekt"
Set rs2 = db.OpenRecordset("Auswahl_mehrere_Projekte", dbOpenTable)
countt = rs2.RecordCount
ReDim rep(1 To countt)
n = 1
Do
If rs.RecordCount = 0 Then
rs.AddNew
Else
rs.MoveFirst
rs.Edit
End If
'make a copy:
rs![project_unit_name] = rs2![project_unit_name]
rs![pgid] = rs2![pgid]
rs![pgdeep] = rs2![pgdeep]
rs![pid] = rs2![pid]
rs![pdeep] = rs2![pdeep]
rs![uid] = rs2![uid]
rs.Update
'new Report:
Set rep

rep

rs2.MoveNext
n = n + 1
Loop Until (n > countt) Or (rs2.EOF = True)
rs2.Close
rs.Close
db.Close
DoCmd.Close acForm, "Auswahl_Projekt", acSaveNo
DoCmd.RunCommand acCmdTileVertically
Case “Bla bla bla”
......
......
......
End Select
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~