Pdeters,
Use DLookup to grab a value from the query.
stOutputName = stOutputName & DLookup("PaymentDate", "QueryNameGoesHere")
But, if the target is actually a date, you may need to reformat it before it can be used in a file name (no slashes allowed in filenames!)
stOutputName = stOutputName & Format(DLookup("PaymentDate", "QueryNameGoesHere"), "mm-dd-yyyy")
Or use "yyyy-mm-dd" if you want the names to sort asciibetically.
HTH,
pT72