i am trying to check if a customers has treatments left from a table and if not then
no msgbox how ever if a customer has 2 treatments then msgbox is displayed
e.x
customer name ,david, Treatment name, HairCut remain 0
customer name, david ,Treatment name ,Nails remain 5
i did a loop used rs.BOF And rs.EOF but still he skips the customers name that has treatments left why?
what is missing in my code?
tnx in advanced
salsa31
no msgbox how ever if a customer has 2 treatments then msgbox is displayed
e.x
customer name ,david, Treatment name, HairCut remain 0
customer name, david ,Treatment name ,Nails remain 5
i did a loop used rs.BOF And rs.EOF but still he skips the customers name that has treatments left why?
what is missing in my code?
Code:
Set rs = CN.Execute("select SubTreatment,SubRemain from Subscribers WHERE SubCust='" & RplS(txtSubject.text) & "'")
While Not rs.BOF And rs.EOF
If rs!SubRemain > 0 Then
MsgBox "This Customer has Treatments left " & rs!SubTreatment
Exit Sub
End If
rs.MoveNext
Wend
salsa31