?
Solved

how to send notification when inventory level is below minimum?

Posted on 2004-04-02
3
Medium Priority
?
439 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 1

Accepted Solution

by:
John_Crumley earned 500 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

What Is Blockchain Technology?

Blockchain is a technology that underpins the success of Bitcoin and other digital currencies, but it has uses far beyond finance. Learn how blockchain works and why it is proving disruptive to other areas of IT.

Question has a verified solution.

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

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
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 …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

762 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