Hello,
I want to set some textboxes of a report in its header from the selected thing in a combobox
So far I have this code to Open a premade Report and filling the detail part of the Report.
I would like to set the value of a textbox in the header of the form "Bericht"
I thought of something like:
I know there is missing the part for addressing the header but I just cant figure out how to access the header I read a few diffrent things but non worked.
Also I cant realy use the OpenArgs because i access the report from diffrent forms.
Thanks for your help in advance
I want to set some textboxes of a report in its header from the selected thing in a combobox
So far I have this code to Open a premade Report and filling the detail part of the Report.
Code:
Private Sub openvorlage_Click()
Dim aktionsauswahl As String
aktionsauswahl = Kombinationsfeld32.Value
Dim strNewRecord As String
strNewRecord = "SELECT Hauptliste.* FROM Hauptliste " & "WHERE (([Hauptliste].[" & aktionsauswahl & "] Not In (0)))" _
DoCmd.SelectObject acReport, "Vorlage", True
DoCmd.CopyObject , "Bericht", 3, "Vorlage"
DoCmd.OpenReport "Bericht", 6
Reports!Bericht.RecordSource = strNewRecord
I would like to set the value of a textbox in the header of the form "Bericht"
I thought of something like:
Code:
Reports!Bericht!txtTitle.Value = [aktionsauswahl]
Also I cant realy use the OpenArgs because i access the report from diffrent forms.
Thanks for your help in advance