K
Kerstin Schiebel
Hi,
I want to open a report with different queries.
In a form the user can choose a department from a combobox.
The name of the query will be created in a vba script e.g. MEWE_Summe pro
KST oder T-Lab_Summe pro KST
But it does not work. After opening the report (PoF) a false recordsource is
inscribed (= the original recordsource from
creating the report). If I delete the recordsource in the report I get an
error message.
----------------------
AbfrageName = Forms![Hauptmenü]![Abteilung] & "_Summe pro KST"
stDocName = "PoF"
DoCmd.OpenReport stDocName, acPreview, AbfrageName, LinkCriteria
--------------------
The content of AbfrageName is correct, but it was not used during opening
the report.
Could anybody tell me what goes wrong?
Thanks
Kerstin
I want to open a report with different queries.
In a form the user can choose a department from a combobox.
The name of the query will be created in a vba script e.g. MEWE_Summe pro
KST oder T-Lab_Summe pro KST
But it does not work. After opening the report (PoF) a false recordsource is
inscribed (= the original recordsource from
creating the report). If I delete the recordsource in the report I get an
error message.
----------------------
AbfrageName = Forms![Hauptmenü]![Abteilung] & "_Summe pro KST"
stDocName = "PoF"
DoCmd.OpenReport stDocName, acPreview, AbfrageName, LinkCriteria
--------------------
The content of AbfrageName is correct, but it was not used during opening
the report.
Could anybody tell me what goes wrong?
Thanks
Kerstin