R
RJF
I have been using the code below to export a query to a .txt file, letting
the user select the path and type in the file name. It works great.
However, the users now want to still select the path, but instead of typing
in the file name, they want me to create a variable that will automatically
name the file. I created the variable YYMM_01 that contains the file name.
Can someone help me change this so that the user does not need to type in a
file name, but it automatically grabs the variable?
Thank you in advance for any help you can give me.
strfilter = ahtAddFilterItem(mystrFilter, "Text Files (*.txt)", "*.txt")
strSaveFileName = ahtCommonFileOpenSave( _
OpenFile:=False, _
Filter:=strfilter, _
Flags:=ahtOFN_OVERWRITEPROMPT Or
ahtOFN_READONLY)
DoCmd.TransferText acExportFixed, "ERSCUST_Laser_Export_Spec", "qry_Laser",
strSaveFileName
the user select the path and type in the file name. It works great.
However, the users now want to still select the path, but instead of typing
in the file name, they want me to create a variable that will automatically
name the file. I created the variable YYMM_01 that contains the file name.
Can someone help me change this so that the user does not need to type in a
file name, but it automatically grabs the variable?
Thank you in advance for any help you can give me.
strfilter = ahtAddFilterItem(mystrFilter, "Text Files (*.txt)", "*.txt")
strSaveFileName = ahtCommonFileOpenSave( _
OpenFile:=False, _
Filter:=strfilter, _
Flags:=ahtOFN_OVERWRITEPROMPT Or
ahtOFN_READONLY)
DoCmd.TransferText acExportFixed, "ERSCUST_Laser_Export_Spec", "qry_Laser",
strSaveFileName