Form>Snapshot>Email (AC97)

Aviator

New member
Local time
Today, 19:06
Joined
Jan 10, 2006
Messages
6
First off, hello to everyone here. I have been using these forums for a couple of months now and they have helped me solve many, many problems.

I've not needed to register before now because everything I needed to find out I was able to find an answer for, so THANK YOU:)

Anyways, back to business............................

I've built a reporting application where the users basically enter details on a form that performs a few lookups to autofill some info and they input the rest.

What happens next is when they submit the 'form', it appends details to a table and sends an email with the details entered to an address specified by a populated text box on the form

One of 3rd party contractors has requested we send this info in .snp format instead of just referencing the textboxes in the body of the mail.

I have created a duplicate of the form in snapshot but cannot figure out how to do the following:

1. Reference the open form to populate the fields

2. Then attach this to the email

Any help would be greatly appreciated.......as I'm tearing my hair out (and I don't really have much left to tear out anyway)

Many thx in adv
 
Make a report that outputs what you want. Then attach it as a .snp file.
 
I'm slightly confused by you saying you have recreated a form in Snapshot format. As far as I am aware, Snapshot format is for a report, not a form. I will presume that you have the report created. In this case, I would use DoCmd.OutputTo to create the snapshot report, then DoCmd.SendTo to email it. I'll presume you have some idea with VBA if you already have something being emailed. Post back if you struggle with the code.

Incidentally, XML can be a good format to send data in; it tends to be acceptable to most applications these days.
 
I understand what you are saying (i think) but would like to be able to do it at the click of a button
 
Aviator said:
I understand what you are saying (i think) but would like to be able to do it at the click of a button

Yep, and thats exactly what I meant. All buttons have code behind them. You need to write the VBA to do what you want, then "attach" the code to this button.
 
thanks Reclusive,

I'm back in the office tomorrow and I'll have a go

might take you up on your offer for the coding help though;)
 
I got this working...........finally :eek:

Does exactly what I wanted (thanks reclusivemonkey for the direction)

If anyone is interested here is the vba I used within the SendMail Function and linked it to the attachment path

Code:
DoCmd.OpenReport "rpt_reportname", acViewPreview
DoCmd.OutputTo acOutputReport, "rpt_reportname", "Snapshot Format", strpath & "reportname.snp"
DoCmd.Close acReport, "rpt_reportname"

Cheers

Avi
 
Last edited:

Users who are viewing this thread

Back
Top Bottom