Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

how to send notification when inventory level is below minimum?

Posted on 2004-04-02
3
Medium Priority
?
487 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

Fill in the form and get your FREE NFR key NOW!

Veeam® is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

610 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