Hello again
I found such a solution and it works:
If Me.x > DLookup("[stock_level]", "tbl_stock", "[Warehouse_ID] = " & Forms!frm_stock!series_product ) Then
MsgBox "x is to big", vbInformation, "Stock"
Me.x.SetFocus
I think they referred to the wrong cell in the table.
now looks up...
@The_Doc_Man
I made a change based on your suggestion. I tested and I see that it works correctly.
I would now like to secure my form against the possibility of deducting too much value - what an employee may do by mistake.
I have used IF functions to force employees to enter data or select...
One more issue the form allows me to subtract the value 1, 2 and 3 but any other is thrown out as too large.
Even if the warehouse level is 1, the form allows you to subtract the value 3 ...
I am using the DoCmd.RunSQL clause
DoCmd.RunSQL " Update tbl_stock Set stock_level = stock_level - x.Value WHERE Warehouse_ID = series_product.Value "
I refer to series_product because the series allows the worker to define the product.
wow! this is the first forum where I got an answer so quickly - thank you very much.
So I have a table that contains values like this:
Warehouse_ID / series_product / stock_level
The employee records withdrawals from stock
specifies the product using the form - the form searches for the...
Hi,
I have a problem!
I am trying to create a simple database that coworkes can take products from stock.
I need to check at x value is not bigger than stock value and if is I would like to show a comments : value is to bigg.
I have code like this :
Private Sub cmdlagre_Click()
If...