Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / August 2005

Tip: Looking for answers? Try searching our database.

sending form via email

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Daniel M - 16 Aug 2005 05:35 GMT
I have a form with a submit button. This button currently writes the form
data to a table, now i want to add the functionality to email a short
message that ticket #xxx was created where the ticket# comes from the form.

Could someone help me get this done? I can send a table but i cant figure
out how to send a form or put in the data in the message body. alternately i
could just send a screenshot of the form.

thanks.
daniel.
Chris B - 16 Aug 2005 08:07 GMT
Daniel,
You cannot send a Form, you can send a report though in various formats, try
right clicking your mouse over the form name you want to create a report for
and select save as report,
Then create a macro and select "sendObject", select the name of this report
and send in the format you wish, like snapshot, in the subject heading you
could fill in =[Forms]![tblName]![ticket#field], this will then call up the
ticket number for that particular report.
Name the macro something like emailmacro and refer to it on the on-click
event of a command button on your form.

>I have a form with a submit button. This button currently writes the form
>data to a table, now i want to add the functionality to email a short
[quoted text clipped - 6 lines]
>thanks.
>daniel.
Daniel M - 17 Aug 2005 01:31 GMT
Chris,

Thanks, this procedure works well. the only thing i cannot figure out now is
how to change the =[Forms]![tblName]![ticket#field] subject line to work
right. I have it inserting the ticket number but i would like to be able to
insert some text as well. IE: "Ticket number xxx is now ready for review"

thanks.

> Daniel,
> You cannot send a Form, you can send a report though in various formats,
[quoted text clipped - 23 lines]
>>thanks.
>>daniel.
Chris B - 17 Aug 2005 07:37 GMT
Hi Daniel,
You can try this:
="Ticket#"& " " &[Forms]![tblName]![ticket#field]&" "&"is now ready for
review"
Let me know how it goes
Chris

>Chris,
>
[quoted text clipped - 10 lines]
>>>thanks.
>>>daniel.
Chris B - 17 Aug 2005 07:56 GMT
Sorry, this is what you had asked for - I had used a # instead of the word
Number....

="Ticket Number"& " " &[Forms]![tblName]![ticket#field]&" "&"is now ready for
review"

>Hi Daniel,
>You can try this:
[quoted text clipped - 8 lines]
>>>>thanks.
>>>>daniel.
Daniel M - 17 Aug 2005 18:33 GMT
Chris,

This works a little bit better, the only problem now is since i changed the
button to run a macro it now never runs my vb code. can i call the macro
from the vb code? or vise versa? i am just submitting the data to a table
and refreshing the form. Thanks.

> Sorry, this is what you had asked for - I had used a # instead of the word
> Number....
[quoted text clipped - 15 lines]
>>>>>thanks.
>>>>>daniel.
Chris B - 18 Aug 2005 06:59 GMT
Daniel,
Im still very new at this but im sure you can call the macro in VBA with
DoCmd.RunMacro "MacroName"
Chris

>Chris,
>
[quoted text clipped - 8 lines]
>>>>>>thanks.
>>>>>>daniel.
Daniel M - 19 Aug 2005 03:05 GMT
Ok now i'm back to the start. I was able to call the macro from VB and have
saved the form as a report but now whenever i generate the email it creates
and email with every record in it, not just the single record.

=[Forms]![request]![rma_number]

how do i specify a single record?

> Daniel,
> Im still very new at this but im sure you can call the macro in VBA with
[quoted text clipped - 15 lines]
>>>>>>>thanks.
>>>>>>>daniel.
Chris B - 19 Aug 2005 06:44 GMT
Daniel, applogies for the two steps forward, three steps back scenario!!
Its always a little tricky trying to fix something you cant see

You now need a query to filter to current open record only -
Create a query in design view, click on the table where the [rma_number] lies.

1)In the first column - Field place the * referance field, Table should be
automatically filled in, Tick/check the Show box.
2)In the second column - Field Place the  [rma_number], table field should be
filled in automatically, UNCHECK / UNTICK the SHOW BOX, THEN in Criteria type
in exactly    [Forms]![request]![rma_number]    NOTE NO = Signs
Save the query as anything you want.
Go to the  report  in question and on RECORD SOURCE refer to this query you
just made.
This then should filter the report to the record which is currently open on
your screen.

If you want , zip your database and send to me and I'll try my best to help
you butborisatyahoodotcom
Replace "at" with@ and "dot " with .

Chris

I
>Ok now i'm back to the start. I was able to call the macro from VB and have
>saved the form as a report but now whenever i generate the email it creates
[quoted text clipped - 9 lines]
>>>>>>>>thanks.
>>>>>>>>daniel.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.