T
TeeSee
I would like to be able to loob back to the InputBox when the user
(Me! at the moment) keys a number equal to or larger than 1. I am
getting the LOOP withou DO error. Could someone please set me straight
with my logic or lack thereof. If I input the correct less than 1
value the code sails thru.Thanks
Do While sglDiscount >= 1
strMessage = "Please input the new discount as a decimal"
Title = "Discount Update"
strInput = InputBox(strMessage, strTitle, Default, 5000,
3000)
sglDiscount = Val(strInput)
Debug.Print sglDiscount
If sglDiscount >= 1 Then
intResponse = MsgBox("Please input as a decimal as
asked!", vbOK + vbCritical, "WHOOOPS!")
End If
If intResponse = vbOK Then
Loop
Else
With rs
.MoveFirst
Do While Not .EOF
.Edit
!Discount = sglDiscount
.Update
.MoveNext
Loop
End With
End If
rs.Close
db.Close
Set rs = Nothing
Set db = Nothing
End Sub
(Me! at the moment) keys a number equal to or larger than 1. I am
getting the LOOP withou DO error. Could someone please set me straight
with my logic or lack thereof. If I input the correct less than 1
value the code sails thru.Thanks
Do While sglDiscount >= 1
strMessage = "Please input the new discount as a decimal"
Title = "Discount Update"
strInput = InputBox(strMessage, strTitle, Default, 5000,
3000)
sglDiscount = Val(strInput)
Debug.Print sglDiscount
If sglDiscount >= 1 Then
intResponse = MsgBox("Please input as a decimal as
asked!", vbOK + vbCritical, "WHOOOPS!")
End If
If intResponse = vbOK Then
Loop
Else
With rs
.MoveFirst
Do While Not .EOF
.Edit
!Discount = sglDiscount
.Update
.MoveNext
Loop
End With
End If
rs.Close
db.Close
Set rs = Nothing
Set db = Nothing
End Sub