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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Snapshot button need a code for a variable to separate snapshot file

Status
Not open for further replies.

lr999

Technical User
May 16, 2011
30
US

Hi
I need to add a variable to the output snapshot file, to be able to print the name with a new 'step#', when the user press the 'snapshot' command button on the form. Never done this before, My code is:

Private Sub PrintPDF_Click()
On Error GoTo Err_PrintPDF_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Script"

stLinkCriteria = "[ScriptID]=" & Me![ScriptID1]
DoCmd.OpenReport stDocName, acPreview, , stLinkCriteria
DoCmd.OutputTo acOutputReport, stDocName, acSnapshot, "L:\Hopes\UAT Management\Script Library\script.snp"

Exit Sub

Err_PrintPDF_Click:
MsgBox Err.Description
Resume Exit_PrintPDF_Click
End Sub
 

Which line of code so you want to modify?

Could you tell us what do you have now AND what do you want to have?

Just trying to find out where do you want your 'step#'....

Have fun.

---- Andy
 
Where the output name of the file is, which is 'script.snp'

DoCmd.OutputTo acOutputReport, stDocName, acSnapshot, "L:\Hopes\UAT Management\Script Library\script.snp"


thanks
 

This is what you do have now, what do you want to have?

DoCmd.OutputTo acOutputReport, stDocName, acSnapshot, "L:\Hopes\UAT Management\Script Library\script[red]123[/red].snp"

???


Have fun.

---- Andy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top