Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

File ID Help

Status
Not open for further replies.

anon1971

Programmer
Aug 9, 2008
88
US
Below is the code I am working on and what I need to do is just have on click it save the file to a folder and automaticly use the date as the file name but it keeps saving the file name as Date() rather than the date can anyone help?

Private Sub Command378_Click()
DoCmd.OutputTo acReport, "Letter", "RichTextFormat(*.rtf)", "\\192.168.0.1\Letters\& Date()", False, "", 0

End Sub
 
DoCmd.OutputTo acReport, "Letter", "RichTextFormat(*.rtf)", "\\192.168.0.1\Letters\" & Date(), False, "", 0
 
Hi,
Code:
Private Sub Command378_Click()
    DoCmd.OutputTo acReport, "Letter", "RichTextFormat(*.rtf)", "\\192.168.0.1\Letters\" & Format(Date(),"yyyy-mm-dd"), False, "", 0
    
End Sub


Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Thanks guys works great but I have one more thing how do I add the time and seconds to the equation?
 
DoCmd.OutputTo acReport, "Letter", "RichTextFormat(*.rtf)", "\\192.168.0.1\Letters\" & Format(Now,"yyyy-mm-dd_hh-nn-ss"), False, "", 0

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thanks it works great guys just wish I could out put via tiff format.
 
One more thing Guys I can't get the snapshot to work because of the s in the exe of the file. Is there a way to get this to work or to use tiff file format?


DoCmd.OutputTo acReport, "Letter", "SnapshotFormat(*.snp)", "\\192.168.0.1\Letters\" & Format(Now, "yyyy-mm-dd_hh-nn-ss.snp"), False, "", 0
 
Code:
DoCmd.OutputTo acReport, "Letter", "SnapshotFormat(*.snp)", "\\192.168.0.1\Letters\" & Format(Now, "yyyy-mm-dd_hh-nn-ss") & ".snp", False, "", 0

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
I could have sworn I tried it that way but I guess not it works now. Is there any way to format in tif?
 
Using this method you are limited by the acFormat.

You need to use some other software.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Ok I got every thing working but I need to retrieve the file path like so:

Dim stAppName As String
DoCmd.OutputTo acReport, "Letter", "SnapshotFormat(*.snp)", "\\192.168.0.1\Letters\" & Format(Now, "yyyy-mm-dd_hh-nn-ss-ms") & ".snp", False, "", 0
FilePath = getLastTIF("\\192.168.0.1\letters\")

But it want look for the SNP in place of the tif.
 
What is function getLastTIF???

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top