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

SendObject cmd from VB - cant close Access properly

Status
Not open for further replies.

gareth99

Programmer
Oct 26, 2001
7
0
0
GB
When I execute the following code I cannot seem to get Access to close properly.It remains open so every time i execute this cmd from my button it re-opens another instance of access.

ac.OpenCurrentDatabase mydb.Name

ac.DoCmd.OpenReport "Report1", acViewPreview

DoCmd.SendObject acSendReport, "Report1", acFormatSNP, _
"Dave.Dog@Kennel.co.uk", , _
"Title", , False

ac.CloseCurrentDatabase

Also does any one know another way of using acFormatSNP.
I cant seem to get VB/Access to accept the .snp without selecting from the access default list.I can do it automatically with acFormatXLS or .HTML etc but not snapshot.

Thanks, Gareth

 
You should terminate the access object that you opened the first time.

Should be like:

ac.quit

set ac = nothing

Hope this helps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top