pop-up warning

T

Toolz2life

I am doing a Printer inventory and have two columns, type of cartridge and
the quantity. What I would like to do is when the quantity of each cartridge
goes below 3 when exiting, every time, a pop up warning “Inc is low for
cartridge X. Order more “shows up. So far I have it giving a pop up that
tells when the quantity is low, but want I really want it to do is tell the
type of cartridge that is low at every exit. Can this be done?

Thanks

Toolz
 
M

manningfan

Sure. Check your Inventory table for records where Quantity is less
than 3 (you can probably write a permanent query that does this and
just check the recordcount of the query on exit), and then loop through
the results with a msgbox that pops up with the cartridge name and
quantity pulled from the query.
 
T

Toolz2life

what would the code look like

Sure. Check your Inventory table for records where Quantity is less
than 3 (you can probably write a permanent query that does this and
just check the recordcount of the query on exit), and then loop through
the results with a msgbox that pops up with the cartridge name and
quantity pulled from the query.
 
M

manningfan

dim db as database
dim rec as recordset

set db = currentdb
set rec = db.openrecordset("Select * from tblInventory where Quantity <
3")

do while rec.eof = false
msgbox "There are currently " & rec("Quantity") & " cartridges left
of " & rec("Product") & ". Please reorder."
loop
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top