Hi, could someone point out where I'm going wrong with this loop, trying to run Update query number of times, is this possible??
Private Sub Command38_Click()
Dim startDate As Date, endDate As Date
Dim tempvalue As Long, dayCtr As Long
startDate = InputBox("Enter the Start Date")
endDate = InputBox("Enter the End Date")
dayCtr = DateDiff("d", startDate, endDate)
Do
DoCmd.OpenQuery "Qry_04_ReOrderDietPlan", acViewNormal, acEdit
tempvalue + = 1
Loop Until tempvalue = dayCtr
End Sub
Private Sub Command38_Click()
Dim startDate As Date, endDate As Date
Dim tempvalue As Long, dayCtr As Long
startDate = InputBox("Enter the Start Date")
endDate = InputBox("Enter the End Date")
dayCtr = DateDiff("d", startDate, endDate)
Do
DoCmd.OpenQuery "Qry_04_ReOrderDietPlan", acViewNormal, acEdit
tempvalue + = 1
Loop Until tempvalue = dayCtr
End Sub