Emailing 1 record from a form

  • Thread starter Thread starter justine
  • Start date Start date
J

justine

Guest
Is there a way to email 1 record from a form. I have it set up where when the user opens the requisition form it opens to a blank form, they fill it out and need to send it to the purchasing dept. I am somewhat new to access and I'm not sure if this is possible. One thing I have learned is there is usually a way to do anything. So if you have any ideas on how to do this please let me know. Also I am trying to find a way to build some type of expression that would say if one field is left blank or null then another field is required for approval. Just shoot some ideas if you have them. Thanks
 
I agree this is possible, but I also think it will be extremely hard. Here is how I would try doing it. create you form. Place an email cmdbutton on the form. That cmdbutton is going to call the advapi32.dll Library, which you will need to code it to open up an instance of Outlook (assuming Outlook is what you want to use). You will then need to pass all of the information in the form to variables, and have those variables placed in the body of the Outlook message. Then all you would need to do is select who you are going to send it to, and press "SEND"...However, unless you have several years experience with Visual Basic or VBA I would not even attempt to do this.
The reason? You will need to declare functions that will need to get information from the system registry.
[This message has been edited by Memnoch1207 (edited 05-20-2002).]

[This message has been edited by Memnoch1207 (edited 05-20-2002).]
 
On the sending of the Email. Make life easier.

1. Use SendObjects. You will send a Report Object

2. Create a report that opens to the Unique ID of the Requisition.


On your critera for filling out fields, you will need to add the code to the AfterUpdate Event of the fields and the BeforeUpdate Event of the Form. You want to make sure that Information is correctly entered prior to the Email/Saving of the Requisition.
 
Realise you can change the message body to whatever you want. You can make the message body part pre entered text, part references to fields on frmEmail

If you want an example of this let me know...
 

Users who are viewing this thread

Back
Top Bottom