changing text in report at runtime
I have a form which allows the user to select the report selection criterea and then display the report.
This part works fine. I would like, however, to have a text box on the report which shows the selection critera.
I wrote the following test:
VB Code:
DoCmd.OpenReport "test", acViewPreview
Reports!test!txtcriterea.Value = "a test"
This works, but the txtcriterea text box is in the page header and only shows the value "a test" from the 2nd page on. If I put it in the report header, it doesn't show at all. Also, if swap the lines of code, so that I set the value before showing the report, I get an error saying that the report either does not exist or is not open!
Please help.
Francis