Hi,
I have a VBA function to transfer data from a query to a text file. The code is as follows:
Public Function ExportUsage()
DoCmd.TransferText acExportDelim, "Usage_Export_Spec", "usagequery2", "C:\Usage.txt", No
MsgBox "Export Completed!"
End Function
However, I need to extend this as the tablename and filename are specified in this code. I need to be able to allow the user to be able to specify the tablename and filename dynamically in a user friendly way rather then mess about with the code to change the details to reflect exporting of different queries into different locations.
Does anyone no how to do this, perhaps i can pass parameters? if so, how?
Many Thanks
I have a VBA function to transfer data from a query to a text file. The code is as follows:
Public Function ExportUsage()
DoCmd.TransferText acExportDelim, "Usage_Export_Spec", "usagequery2", "C:\Usage.txt", No
MsgBox "Export Completed!"
End Function
However, I need to extend this as the tablename and filename are specified in this code. I need to be able to allow the user to be able to specify the tablename and filename dynamically in a user friendly way rather then mess about with the code to change the details to reflect exporting of different queries into different locations.
Does anyone no how to do this, perhaps i can pass parameters? if so, how?
Many Thanks