Error message

J

Joe Holzhauer

I'm writing a veterinary blood banking database that is supposed to include
a current inventory of each type of blood and plasma on the main menu.

I have an UpdateInventory() sub that should update the displayed inventory
using DCount. Every time I have the sub run (from the form's load, current,
activate, etc. events--it doesn't matter), I get the following error:

#2001: You canceled the previous operation.

The debugger puts me at the first line of my sub:

lblNegativePRBCInventory.Caption = DCount("UnitID", "qryUnitInventory",
_
"ComponentID = 1 AND BloodTypeID = 2 AND Used = False")

Help is blank on this topic. Any idea what I'm doing wrong?

Thanks for any ideas!
Joe
 
R

Rob Oldfield

The basic idea should work - try just putting your line of code on its own
into the load event of the form (for example). If that is OK then it must
be something else in your code that's causing the problem. Assuming you use
the load event... what else are you doing in there... and what else is in
the update inventory sub?
 

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

Top