Msimpson79
New member
- Local time
- Today, 07:57
- Joined
- May 27, 2014
- Messages
- 3
Hi all...
I'm trying to set up a stock & order database. I have some work in OOBase but seen as we have Access and never use it, I thought I would give it a try.
So.... If the parts required for an order are available, the we wouldn't need to order any. If there isn't enough in stock ([Wendland Products].[Units Avalibe]) it should put the pack quantity ([Wendland Products].[Pack Qtt]) into the order field.
It would seem the value from the column isn't passed on in the macro.
I have an image of how it's set up but I cannot post it (need 10 posts)
My combo box is:
SELECT [Wendland Products].ProductID, [Wendland Products].[Product Code], [Wendland Products].[Product Description], [Wendland Products].[Units Allocated], [Wendland Products].[Pack Qtt], [Wendland Products].[Units Avalibe] FROM [Wendland Products] ORDER BY [Wendland Products].[Product Code];
in the on update event i have tried:
Private Sub Quantity_AfterUpdate()
If [ProductCode_comb].[Column](5) < Me.Quantity Then
Me.Ordered = [ProductCode_comb].[Column](4)
End If
End Sub
and
Private Sub Quantity_AfterUpdate()
Select Case [ProductCode_comb].[Column](5)
Case Is < Me.Quantity
Me.Ordered = [ProductCode_comb].[Column](4)
End Select
End Sub
Eventually, I would like it to update the units in stock, units available and units on order fields in the products table but if i can't even get this working.... :banghead:
Can this be done? If so, what's the problem?
Thanks
Mark
I'm trying to set up a stock & order database. I have some work in OOBase but seen as we have Access and never use it, I thought I would give it a try.
So.... If the parts required for an order are available, the we wouldn't need to order any. If there isn't enough in stock ([Wendland Products].[Units Avalibe]) it should put the pack quantity ([Wendland Products].[Pack Qtt]) into the order field.
It would seem the value from the column isn't passed on in the macro.
I have an image of how it's set up but I cannot post it (need 10 posts)
My combo box is:
SELECT [Wendland Products].ProductID, [Wendland Products].[Product Code], [Wendland Products].[Product Description], [Wendland Products].[Units Allocated], [Wendland Products].[Pack Qtt], [Wendland Products].[Units Avalibe] FROM [Wendland Products] ORDER BY [Wendland Products].[Product Code];
in the on update event i have tried:
Private Sub Quantity_AfterUpdate()
If [ProductCode_comb].[Column](5) < Me.Quantity Then
Me.Ordered = [ProductCode_comb].[Column](4)
End If
End Sub
and
Private Sub Quantity_AfterUpdate()
Select Case [ProductCode_comb].[Column](5)
Case Is < Me.Quantity
Me.Ordered = [ProductCode_comb].[Column](4)
End Select
End Sub
Eventually, I would like it to update the units in stock, units available and units on order fields in the products table but if i can't even get this working.... :banghead:
Can this be done? If so, what's the problem?
Thanks
Mark