"Change the recorder value for an item" help?

microsoftgirl

Registered User.
Local time
Today, 14:03
Joined
Oct 14, 2011
Messages
13
**In the title I meant "reorder value" sorry.

I want to make it so that if 0 is entered into the product details table for the stock amount, then the stock would no longer be available.

However, before it gets to 0, I want to do this:
I have a field for minimum stock level and one for stock level.

I want to say that if the stock level field goes below what appears in the minimum stock level field, then a message/warning is displayed, instructing the user to order more stock.

Can someone please help me with this, or provide me with a link(possibly a youtube video) as a tutorial?
 
Last edited:
Hi,

You could create a query that will check the Stock Level against the Minimum Level:

Create a new query. Add the Stock Table.

Add the ID field of the stock table, Stock Level & Minimum Stock

Then in the next field type:

LowStock: IIf([StockLevel]<[MinimumStock],"STOCK LOW","STOCK OK")

Hope this helps
 
Hi,

You could create a query that will check the Stock Level against the Minimum Level:

Create a new query. Add the Stock Table.

Add the ID field of the stock table, Stock Level & Minimum Stock

Then in the next field type:

LowStock: IIf([StockLevel]<[MinimumStock],"STOCK LOW","STOCK OK")

Hope this helps

Thank you so much for this. It's just that when I enter 9 as the stock level, when 10 is the minimum stock level, it's still saying that the stock is ok. Even though it should be telling me to reorder.
 
Hi,

Just to check, in the code:

LowStock: IIf([StockLevel]<[MinimumStock],"STOCK LOW","STOCK OK")

The StockLevel is the name of the Stock Level field in your table and the MinimumStock is the name of the Minimum Stock Level field?
 
Hi,

Just to check, in the code:

LowStock: IIf([StockLevel]<[MinimumStock],"STOCK LOW","STOCK OK")

The StockLevel is the name of the Stock Level field in your table and the MinimumStock is the name of the Minimum Stock Level field?

I've just tried the code on a practice database I've been using, and it worked. It's the exact same on the current database I'm using so it must be something that I've done wrong. Thanks for the help though. I know that it works so I'll find a way of fixing it somehow. Thank you. :)
 
If you can't fix it, send me a sample of your table and I'll take a look at it for you.
 
If you can't fix it, send me a sample of your table and I'll take a look at it for you.

I fixed it, I had the data type still set as text lol, feel like such an idiot spending so much time trying to fix it without looking at the datatype. Thank you for the code. :D
 

Users who are viewing this thread

Back
Top Bottom