Sent via pm.
Sent via pm.
Your errors are because the two textboxes don't exist. If I add them to the form, the query and report run fine.
Hmm, I guess I don't understand. I have the text boxes on the bottom of the form with the control source =[reportprint]![txtStart] and txtEnd. Am I missing something?
=[Forms]![reportprint]![txtStart]
refers to a textbox named txtStart on the form named reportprint. That textbox does not exist. You need two textboxes with those names. The user would input their desired starting/ending dates into those textboxes. The ones at the bottom don't do anything for you.
Gotcha, I see now. So I named the text boxes txtStart and txtEnd and removed the control source from the text boxes and now they allow input, However when I generate the report it's always blank.
Just to verify this is what I have in the query
Code:AND (((reports.timestamp)) Between Eval("[Forms]![reportprint]![txtStart]") And Eval("[Forms]![reportprint]![txtEnd]")))
In the sample db, none of the names matched. I changed one and the query/report returned that record.
Working on a few bugs I will mark as solved as soon as everything runs smoothly, thank you so much.
You need to add the dates, along the lines of:
=ConcatRelated("[condname]","reports","[cond] = '" & [cond] & "' And ([condemp]='Brian' Or [condemp]='Chris' Or [condemp]='Jessica') AND timestamp Between #" & [Forms]![reportprint]![txtStart] & "# And #" & [Forms]![reportprint]![txtEnd] & "#")
Could you please expand on that,
With making ConcatRelated() respect the date parameters I don't understand the "#" variable?Code:AND (reports.timestamp Between Eval("[Forms]![reportprint]![txtStart]") And Eval("[Forms]![reportprint]![txtEnd]") ))
Nevermind, my head was stuck in the query. I added this to the ConcatRelated() and it works perfectly, thank you again!
Happy to help!