Hello, I am using a macro and the ImportExportSpreadsheet functions to export the results of a query. I am trying to make the filename either manually entered via prompt, or from a table record using DLookup. This is what I have however access does not let me save because it tells me the File Name is invalid.
="C:\...Filename_" & "DLookup("[FieldName]", "tblTableName", "[ID] = 1" & ".xlsx"
Any help would be appreciated. If it is easier to replace the Dlookup with a prompt to enter something custom, that would work perfect as well.
Thank you