WildBore
November 18th, 1998, 12:10 PM
2 Questions
First how do you change the caption on a label located in the report header of a Data Report. What I want to do is put the Job# and Name of the file I'm printing in the report header. The information is stored in a Dbase and the report header has lables called Job_No and Job_Name. This is the code I have, and nothing happens when it executes. (Putting .caption after the objects gives me an error also)
Private Sub DataReport_Initialize()
Dim dbsActive As Database
Dim rstTemp As Recordset
Set dbsActive = OpenDatabase(Main_Form.Active_Filename)
Set rstTemp = dbsActive.OpenRecordset("Job Info")
With rstTemp
Job_No = !Job_No
Job_Name = !Job_Name
End With
dbsActive.Close
End Sub
Second I seem to be haveing similar trouble as Shappy. I need to print this report in landscape but when I set the Printer.Oriention = 2 It still wants to print in whatever the default is. (I've put PrinterDefault = True before it also and the same thing happens). The workaround that I've done is to open up the CommonDialog.ShowPrinter and set it manually, but that's very inefficent.
Please help me.
Thanx
First how do you change the caption on a label located in the report header of a Data Report. What I want to do is put the Job# and Name of the file I'm printing in the report header. The information is stored in a Dbase and the report header has lables called Job_No and Job_Name. This is the code I have, and nothing happens when it executes. (Putting .caption after the objects gives me an error also)
Private Sub DataReport_Initialize()
Dim dbsActive As Database
Dim rstTemp As Recordset
Set dbsActive = OpenDatabase(Main_Form.Active_Filename)
Set rstTemp = dbsActive.OpenRecordset("Job Info")
With rstTemp
Job_No = !Job_No
Job_Name = !Job_Name
End With
dbsActive.Close
End Sub
Second I seem to be haveing similar trouble as Shappy. I need to print this report in landscape but when I set the Printer.Oriention = 2 It still wants to print in whatever the default is. (I've put PrinterDefault = True before it also and the same thing happens). The workaround that I've done is to open up the CommonDialog.ShowPrinter and set it manually, but that's very inefficent.
Please help me.
Thanx