Greyowlsl
Mlak Mlak
- Local time
- Today, 18:53
- Joined
- Oct 4, 2006
- Messages
- 204
Hi,
The code below slightly works, when i run the code it formulates strange numbers like 25.321 and so on, when it should simply be 10 or 15 or so on since the numbers that should be multiplied are 2*5 and 3*5 etc.
Thanks for any help.
Kind regards,
Leon
The code below slightly works, when i run the code it formulates strange numbers like 25.321 and so on, when it should simply be 10 or 15 or so on since the numbers that should be multiplied are 2*5 and 3*5 etc.
Code:
Private Sub MinStockBtn_Click()
'Refresh command:
DoCmd.RunCommand acCmdRecordsGoToPrevious
DoCmd.RunCommand acCmdRecordsGoToNext
'Run stock form
DoCmd.OpenForm "Stock"
'Link stock form textbox with parts form textbox
wherestrg = "" & Forms!STOCK!Avmonthlyusage & ""
Me.AvgStock = wherestrg
'Min stock formula
Me.MinStock = (Me.AvgStock * Me.LEADTIMEWEEKS * 2 / 4)
'close stock form
DoCmd.Close
End Sub
Thanks for any help.
Kind regards,
Leon