I have a database for users to fill out forms that are applications for a job. Once they are finished I have a macro that runs when they click the command. The command sends an email to me with a MS Word attachment of the report they just created. This is going to take up too much email space so I was wondering if I could do the following... instead of sending an attachment of the report, is there a way I can have a macro send an email to me that just says something like "Application #56 was just created" (with the # linking to the report) so I can know that I should go into the database and check out the person's application. I am stumped b/c it seems like the only macro action I can select to send an email is the SendObject action and all those options send attachments. I would prefer to do this all in a macro as I know nothing about modules and VBA code.
MS Access Email a number?
Here is a simple idea that gives you a "safety net". If you really want to stick with a macro (rather than doing a more powerful vba module) you could just do a macro where you only fill in these fields: To (your email address), Subject (New job application or whatever you want), and the Edit Message set to No. That way you get an email that there is a new application.
Now, add a text field to your Application table called "Staus". You can can have different statuses like New, Approved, Pending, Rejected, etc. Have the default value set to New. Then set up a form that only shows you these "New" applications. You can "review and approve" them from that form and change their status. This would be a nice safeguard in case your email notification does not go through or the user has that lovely feature where Outlook warns them an application is trying to send an email on their behalf and they can cancel it.
Reply:This is something that can be done but unfortunately would need to be coded in VBA. I have some examples if you like but the code is too big to paste here. In effect what your doing is making a call to outlook and you would need to add it to your references. You can then build a text statement with the information and customize everything within the e-mail note. Such as Subject, To, Cc, and Body.
Reply:Not though a MACRO. MACROS are simplfied versions of the MODULES and are not as flexible.
Using a VBA MODULE You can do that send, and it's not as difficult as it seems.
I didn't want to use MODULES when I 1st got started either, but now I can't stand the MACROS since they are SO RESTRICTIVE.
DoCmd.SendObject, acSendNoObject, "", "","%26lt;%26lt;TO ADDRESS%26gt;%26gt;", "%26lt;%26lt;CC%26gt;%26gt;", "%26lt;%26lt;BCC%26gt;%26gt;", "YOUR SUBJECT LINE", "YOUR MESSAGE", False
For a full description simply look up "SendObject" in the ACCESS HELP FILES.
For future reference You could also research in the Microsoft Knowledge Base (It's free!).
Of course, You could always build a simpler report with just "Application #56" in it. That would cut down on the file size and You would still get the info.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment