Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RUN MACRO WHEN CONDITION IS MET

Status
Not open for further replies.

barry2004

Technical User
Oct 13, 2004
42
GB
Hi guys, i would like to know how to Run a Macro when a certain condition has been met.
I have a table called "tbl_inventory" and a query called "qry_CountofInventory", the latter being a count of how many items (lapptops) are in our inventory. Just like conditional formatting i would like to know how to get the database to run a sendObject macro when the quantity is at a certain level (say "4"). I have already created the sendObject macro which is called "sendmailOUT".
 
In VBA you may play with the domain aggregate functions like DLookUp, DCount, ...

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top