D
DS
I need to run this procedjure the number of times that TxtDisplay equals.
If TxtDisplay =1 the it runs once
If TxtDisplay =5 then its five
I think the the problrm is with the first line. Any input appreciated.
Thanks
DS
Dim Spliter as Integer
For Spliter = Forms!SplitPad!TxtDisplay
Me.TxtNextLine = DMax("LineID", "SalesDetails", "SalesID =
Forms!MoveItem!TxtLeftID")
Me.TxtNextLine = Me.TxtNextLine + 1
CurrentDb.Execute "INSERT Into
SalesDetails(SalesID,LineID,ItemID,Quantity, " & _
"MenuNum,BasePrice,Taxed,NoTax,Inclusive) " & _
"VALUES(" & Forms!MoveItem!TxtLeftID & "," &
Forms!MoveItem!TxtNextLine & ", " & _
"" & Forms!MoveItem!TxtItemID & ",1," & Forms!MoveItem!TxtMenuID & ",
" & _
"" & Forms!MoveItem!TxtBasePrice & "," & Forms!MoveItem!CheckTax & ",
" & _
"" & Forms!MoveItem!CheckNoTax & "," & Forms!MoveItem!CheckInclusive
& ")"
Next Spliter
If TxtDisplay =1 the it runs once
If TxtDisplay =5 then its five
I think the the problrm is with the first line. Any input appreciated.
Thanks
DS
Dim Spliter as Integer
For Spliter = Forms!SplitPad!TxtDisplay
Me.TxtNextLine = DMax("LineID", "SalesDetails", "SalesID =
Forms!MoveItem!TxtLeftID")
Me.TxtNextLine = Me.TxtNextLine + 1
CurrentDb.Execute "INSERT Into
SalesDetails(SalesID,LineID,ItemID,Quantity, " & _
"MenuNum,BasePrice,Taxed,NoTax,Inclusive) " & _
"VALUES(" & Forms!MoveItem!TxtLeftID & "," &
Forms!MoveItem!TxtNextLine & ", " & _
"" & Forms!MoveItem!TxtItemID & ",1," & Forms!MoveItem!TxtMenuID & ",
" & _
"" & Forms!MoveItem!TxtBasePrice & "," & Forms!MoveItem!CheckTax & ",
" & _
"" & Forms!MoveItem!CheckNoTax & "," & Forms!MoveItem!CheckInclusive
& ")"
Next Spliter