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?
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
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.
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
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.