Solved

how to send notification when inventory level is below minimum?

Posted on 2004-04-02
3
338 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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

947 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now