Code: Select all
In (Eval("[forms]![frmMain]![cboPeriod1]"),Eval("[forms]![frmMain]![cboPeriod2]"),Eval("[forms]![frmMain]![cboPeriod3]"),Eval("[forms]![frmMain]![cboPeriod4]"))
I then modified the criteria on my query to pull in the listing of selected periods using this code
Code: Select all
Function GetReportingPeriods() As String
Dim strToReturn As String
strToReturn = ""
Dim db As DAO.Database
Set db = CurrentDb
Dim rst As DAO.Recordset
Set rst = db.OpenRecordset("SELECT * FROM tblPeriods WHERE Selected = TRUE", dbOpenForwardOnly)
While Not rst.EOF
strToReturn = strToReturn & "'" & rst![Period Description] & "',"
rst.MoveNext
Wend
rst.Close
Set rst = Nothing
Set db = Nothing
strToReturn = Left(strToReturn, Len(strToReturn) - 1)
GetReportingPeriods = strToReturn
End Function
Code: Select all
In (GetReportingPeriod())
If I put the actual string that gets returned by GetReportingPeriod, however, it works just fine.
Any ideas?
Thanks!