arnelgp
..forever waiting... waiting for jellybean!
- Local time
- Tomorrow, 03:49
- Joined
- May 7, 2009
- Messages
- 20,243
i noticed on the form that you posted that there is a combobox for size?
which you don't have in your item table.
if you want to incorporate the "size" just add it to Item field, example:
1 record for: Elastic Ankle Support, small
1 record for Elastic Ankle Support, medium
etc.
your Combobox for "Item" should also include the "ItemCurrentStock" field,
so the Rowsource of your combo should be:
select Item, ItemCurrentStock from yourTable
then you add code to this combo's (Quantity combo) BeforeUpdate event to show the CurrentStock:
private sub Quantity_beforeUpdate(cancel as integer)
cancel = me.Item.column(1) < Me.Quantity
if cancel then
msgbox "Not enough stock to accommodate this request"
end if
end sub
which you don't have in your item table.
if you want to incorporate the "size" just add it to Item field, example:
1 record for: Elastic Ankle Support, small
1 record for Elastic Ankle Support, medium
etc.
your Combobox for "Item" should also include the "ItemCurrentStock" field,
so the Rowsource of your combo should be:
select Item, ItemCurrentStock from yourTable
then you add code to this combo's (Quantity combo) BeforeUpdate event to show the CurrentStock:
private sub Quantity_beforeUpdate(cancel as integer)
cancel = me.Item.column(1) < Me.Quantity
if cancel then
msgbox "Not enough stock to accommodate this request"
end if
end sub