Wow. Works perfectly. By the way, there is a typo in the BETWEEEN (sp BETWEEN) statement. Took me a bit to figure that one out.
Thanks many times over for your help with this, couldn't have done it without you.
Issue is solved.
Wow. Works perfectly. By the way, there is a typo in the BETWEEEN (sp BETWEEN) statement. Took me a bit to figure that one out.
Thanks many times over for your help with this, couldn't have done it without you.
Issue is solved.
Oops. Looks like I spoke too soon.
When I run the Excel code to copy the data from the query to the Excel spreadsheet (.CopyFromRecordset), the column where the converted date and time should be is blank.
Any ideas why this is?
I did not try the DLookup in my tests. Only thing I can deduce is that Excel can't handle the Access DLookup function. It builds recordset but data constructed using those functions is not processed.
Your only options might be:
1. save the data to a local table with an INSERT SELECT sql and use that table as source for the query
2. push the data from Access to Excel instead of Excel pulling the data
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.