Dynamic Report Query

aguest

Registered User.
Local time
Today, 04:13
Joined
Aug 14, 2014
Messages
34
hi,

I'm not very good with Reports, normally stick to forms but I now need to create a couple in my database.

I've got a form with a number of subforms that are charts which update when I select a couple of drop down boxes.

I've created a filtered report from this form, showing exactly the same thing and the charts load correctly. The three boxes on the top of the form, Academic Year, Surname and Forename won't populate. Can anyone help me out.

My filter code is the following:
DoCmd.OpenReport "rpt_IndivStudent_LRT", acViewReport, , txtrptAcYear = Me.cboAcYr.Column(1) And txtrptSurname = Me.cboStudent.Column(1) And txtrptForename = Me.txtForename

I've tried setting the boxes on the report to the following:
=[Forms]![frm_IndivStudent_LRT]![cboAcYr]
=[Forms]![frm_IndivStudent_LRT]![cboStudent]
=[Forms]![frm_IndivStudent_LRT]![txtForename]
but this doesn't work either.

Thanks for any help.
 
I un-deleted the thread. If my answer helped or you found the answer elsewhere, posting the answer here could help future users with a similar problem.
 
Sorry I hadn't reliased you'd responded when I deleted the message.

In the report I just added the following code in each of the text boxes on the header. The report is only opened from the frm so it can be printed.

=[Forms]![frm_Braveheart_IndivStudent_LRT]![txtacYear]

This seems to have worked. I had to change the combo boxes to hidden text boxes and refer to these instead..
 

Users who are viewing this thread

Back
Top Bottom