Basically, I'm trying to have VBA create a Windows folder named off the value of a report's field. I'm not certain how to reference a report's field value in VBA though. Any suggestions?
Basically, I'm trying to have VBA create a Windows folder named off the value of a report's field. I'm not certain how to reference a report's field value in VBA though. Any suggestions?
Don't (you can't if the report is not open anyway), use instead the control source of the report's control in a dLookup:
MyFolder=Dlookup("ControlSource","ReportRecordSour ceQuery")
Cheers,
Same method as you would do for a form.I'm not certain how to reference a report's field value in VBA though.
If your field is a repeating field in the report, you're going to need to add criteria to that. Took me a moment to figure out what happened to the suggestion, so here it is without the extra space:
Code:MyFolder=Dlookup("ControlSource","ReportRecordSourceQuery")
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.
Thanks Micron, that's way we should always use the code tags.... guilty as charged
TBH I often forego them for a couple of short lines, but I've long been aware of the 50(ish) character break so I watch out for that.
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.