When I transfer text from a query to a .txt file through VBA or a Macro, date fields include the unwanted 00:00:00 time element, i.e., “01/18/2006 00:00:00.” I need to eliminate this so it doesn’t show up in merge docs that use the output for data.
Why is it that when I export the same query to a .txt file through menu commands (File - Export), the dates appear exactly as desired without the 00:00:00? Is there a way to tweak the VBA to automate that? The line below is what I’m working with:
Why is it that when I export the same query to a .txt file through menu commands (File - Export), the dates appear exactly as desired without the 00:00:00? Is there a way to tweak the VBA to automate that? The line below is what I’m working with:
Code:
DoCmd.TransferText acExportMerge, "", "QueryName", "C:\Folder\FileName.txt", True, ""