Hi
I have a form with a listbox whereby the user can select a year, 2004/05 for instance and then open a report based on that choice. the field names for each year are yes/no fields and follow a format of dur_0304, dur_0405 etc
so if the user chooses 2004/05 (the second hidden column in the list box will be dur_0405) I want to say
dim strFilter as string
strFilter = "forms!frmSECTreports!List127.column(1) = true"
' i.e. strFilter = "dur_0405 = true"
DoCmd.OpenReport "rptSECT_current", acViewPreview
Reports!rptSECT_current.Filter = strFilter
Reports!rptSECT_current.FilterOn = True
doesn't like it - I think its something to do with it being a string - any ideas?
thanks
cathy
I have a form with a listbox whereby the user can select a year, 2004/05 for instance and then open a report based on that choice. the field names for each year are yes/no fields and follow a format of dur_0304, dur_0405 etc
so if the user chooses 2004/05 (the second hidden column in the list box will be dur_0405) I want to say
dim strFilter as string
strFilter = "forms!frmSECTreports!List127.column(1) = true"
' i.e. strFilter = "dur_0405 = true"
DoCmd.OpenReport "rptSECT_current", acViewPreview
Reports!rptSECT_current.Filter = strFilter
Reports!rptSECT_current.FilterOn = True
doesn't like it - I think its something to do with it being a string - any ideas?
thanks
cathy