Macro Not Executing Correctly (1 Viewer)

Melody

Registered User.
Local time
Today, 16:26
Joined
Aug 11, 2000
Messages
47
Here's my daily dilemma: I want a Message Macro to display when one of my product's (Quick Start Cards) Units Available drops below 11. So I wrote a Message Macro with the following expressions in the Condition field:
[Forms]![Products]![ProductDescription] In ("Quick Reference Card - Up & Running") And Len([Forms]![Products]![UnitsOnHand])<11

I then put this macro in the Properties of my Units Sold control,the Events Tab, in the After Update field. (because the Units Sold is the field that subtracts from my total Units On Hand.)

Now whenever I enter any number into the Units Sold field, this message pops up, even if my Units Available is not yet below 11. Should I put this macro somewhere else? Any ideas? Thanks!!
 
R

Richie

Guest
Try a different approach
In the after update event
If Me.UnitsOnHand - Me.UnitsSold < 11 Then
MsgBox "Stock on hand has fallen below eleven units", vbOKOnly
End If
 

Melody

Registered User.
Local time
Today, 16:26
Joined
Aug 11, 2000
Messages
47
Richie - Thank you SO much!! It worked - But now I've got a different problem! That control is for numerous products, as each product is a record that displays on the form. (You access the different records by arrow buttons, so that only one product displays at a time). I only want this to apply to one of my products - My Quick Reference Cards. ???
 

Users who are viewing this thread

Top Bottom