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

Control Button - Sending Email 3

Status
Not open for further replies.

achiola

MIS
Apr 26, 2001
44
US
I am looking to write a code so that when I click on a Control button, the information on the Form gets sent to my email. Is this possible? How do I do it?

Nino
 
1. Open a new macro.
2. Choose SendObject for the Action.
3. Once you choose the Action you will get a window that will allow you ObjectType (Form), ObjectName (YourFormName) and so on. It even allows you to choose if you want it to be sent as an excel file or text.
4. Save and Name the Macro.
5. Go to your form and add a command button. The wizard should start.
6. Choose Miscellanious, then Run Macro, then Next.
7. Your new macro should be on the list.
8. Follow the remaining instructions in the wizard and you will be good to go.

B-) ljprodev@yahoo.com
Professional Development
MS Access Applications
 
Lonnie,

That worked great... thanks for the help. I have one other question. When I send my form, the entire datasheet is displayed or sent via email. I only want the new Form (in Form View) or new data information sent. Is there a way to do this? Thanks again for the help you provided, that in itself was a big help for me.

Nino
 
If you are wanting to send a particualar record. The new record. The one you just added. (I am assuming a lot here...).

1. You can create a query with the fields needed.

2. One of the fields will have to be a unique identifier. (like Id Number, or Order Number) In that field's criteria section reference the same field on your form like so:

Forms![YourFormName]![UniqueFieldName]

3. In your macro change the ObjectType and ObjectName to get your query.

Now when you click the button, your query will be sent and the query will only pull the record that has the unique identifier as the record showing on the form.

I hope this is what you need.

B-) ljprodev@yahoo.com
Professional Development
MS Access Applications
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top