Adding a query object in my VB code

M

mahadevan.swamy

In this VB code,

Option Compare Database


'------------------------------------------------------------
' mcrEmailClosure
'
'------------------------------------------------------------
Function mcrEmailClosure()
On Error GoTo mcrEmailClosure_Err


' Email as SNP closure report
DoCmd.SendObject acReport, "rptCloseOut",
"SnapshotFormat(*.snp)",
"", "", "", "Closure Report - Concern Number", "Please see attached
closure report", True, ""


mcrEmailClosure_Exit:
Exit Function


mcrEmailClosure_Err:
MsgBox Error$
Resume mcrEmailClosure_Exit


End Function
---------------------------------------------------------------------------­-----------------------


I want to add a query object called Report # in the subject or
filename. This query object is just a number for a particular report
so that I dont have to type it again and again when i want to send it
to someone else. Any ideas?


Thanks
 

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