Solved

how to send notification when inventory level is below minimum?

Posted on 2004-04-02
3
345 Views
Last Modified: 2006-11-17
I want to realize this function: whenever the inventory quantity for a specific item is below certain level, It will automatically send notifications to me. In my inventory table, there are "total quantity" field and "minimum quantity" field. I created a form, I hope this could work right after I update the quantity for this item, and close the form. Could anyone here help me out on this?

Thanks a lot!
0
Comment
Question by:cuc357
3 Comments
 
LVL 1

Accepted Solution

by:
John_Crumley earned 125 total points
ID: 10745352
Hello!

In the "Form_AfterUpdate" event, add some code similiar to the following skeleton...


Dim subject As String
Dim message As String
Dim toemail As String
   
If me.totalquantity < me.minimumquantity then

    toemail = "you@somewhere.com"
    subject = "Low inventory warning:  " & Me.partnumber
    message = Now & vbCrLf
    message = message & "The stock level for " & Me.partnumber & " has dropped below " & Me.minimumquantity & "." & vbCrLf
    message = message & "The current stock level is " & Me.totalquantity & "."
   
    DoCmd.SendObject acSendNoObject, , acFormatTXT, toemail, , , subject, message, False

End if


This should send an email to the address (or addresses) you specify when the level drops below the minimum.  You may need to adjust the settings on your email client to allow another program to send an email without confirmation.

Hope this helps,

John
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question