Something like this:
Code:
Function CCC_Uploads(Vendor_ID as String)
Dim myFileName as String
myFileName="S:\Orders\Export\" & Vendor_ID & Format(Now(), "yyyymmdd") & ".csv"
On Error GoTo CCC_Uploads_Err
DoCmd.SetWarnings False
DoCmd.TransferText acExportDelim, "CCC Export Specification", "qry_CCC_Upload", myFileName, False, ""
DoCmd.SetWarnings True
CCC_Uploads_Exit:
Exit Function
CCC_Uploads_Err:
MsgBox Error$
Resume CCC_Uploads_Exit
End Function
Note that I added an Input of the Vendor_ID. So if you pass that to your function, it should incorporate it into the file name.
I find it easier to build the complete FileName outside of the TransferText action in a variable, and then reference that variable in the TransferText action.