Inventory control question abt Allen Browne's "Quantity on hand"tip

V

Veli Izzet

Hi all,

I have checked the tip, and it is just what I need.

However being very new in programming etc., I do not know where to put
this code in the database and how to call it.

Any help please,
 
A

Allen Browne

Presumably we are talking about:
http://allenbrowne.com/AppInventory.html

Select the Modules tab of the Database window, and click New.
Paste the code into the new module.
Save it with a name such as Module1.

You will need to have some understanding of VBA to get this to work.
 
V

Veli Izzet

Thanks,

I pasted the code as Module2.

How do I call it from let's say a button?

I tried to put it on the on-click property, but I cannot call it. I know
how to call an event procedure, but this is a function so I am confused.
 
A

Allen Browne

In the event procedure for the Click event of your button, you could enter:
Me.[SomeTextbox] = OnHand(Me.ProductID)

Or, you could just put this into the Control Source of a text box:
=OnHand([ProductID])

The examples assume a numeric field named ProductID.
 
Top