nka
Waterwings inflated
- Local time
- Tomorrow, 07:45
- Joined
- Jul 11, 2005
- Messages
- 16
Hi all,
I am looking to export a query (into Excel) and include a field value as part of the filename.
Example of what I am trying to achieve:
The SuppName needs to look at the Supplier_Name field in TEMP_SupplierItems.
I can't for the life of me get my head around what to do to get it there! I think I need to DIM something and perhaps run SQL somewhere - but I am struggling big time!
Can anyone help please?
I am looking to export a query (into Excel) and include a field value as part of the filename.
Example of what I am trying to achieve:
Code:
DoCmd.TransferSpreadsheet acExport, 8, "TEMP_SupplierItems", "C:/Data Downloads/EXP_SupplierItems_" & [COLOR=Red][B]SuppName[/B][/COLOR] & ".xls", True, ""
DoCmd.Close acForm, "frm_sel_supplierstock"
The SuppName needs to look at the Supplier_Name field in TEMP_SupplierItems.
I can't for the life of me get my head around what to do to get it there! I think I need to DIM something and perhaps run SQL somewhere - but I am struggling big time!
Can anyone help please?
Last edited: