save as snp-report towards a file (using variable to name ans locateit)

G

geert

Hello

In my database I use a select case-tree with a "DoCmd.SendObject"
function resulting in sending a snp formatted mail.
I want to add also a 'save as' function.
I want to save my result (a snapshot format) on a specific directory
such as when I have:
Case "Eric"
Case "John"
that it will be saved under the directory Eric, etc.
I also want to give my snp a name in function on a variable (Client) I
determined earlier
eg. pbsuject1 = rs1.Fields("Client").

Can someone help me?

Thanks
Geert
 
J

Jack Leach

Have you tried using DoCmd.OutputTo, and the rest would be some basic
conditional comparisons when building the output string


Dim strFile As String
strFile = "C:\ThisDir\ThatDir\"
Select Case <somecriteria>
Case "John"
strFile = strFile & "John\report.snp"
Case "Eric"
strFile = strFile & "Eric\report.snp"
End Select

DoCmd.OutputTo acOutputReport, rptName, "SnapshotFormat(*.snp)", sFilename



hth

--
Jack Leach
www.tristatemachine.com

"I haven't failed, I've found ten thousand ways that don't work."
-Thomas Edison (1847-1931)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top