<= is the correct syntax for less then or equal to in VBA. Perhaps if you
post the actual code that's not working for you, some one may be able to see
what the problem is.
The data-type of the variables or constants being compared may make a
difference, too. Numbers or dates may not always compare the way you might
expect if they are being compared as text.
i = "1"
Do While i < (QryDat.Fields.Item("quantity") + 1)
cmoSelectQuantity.AddItem i
i = (i + 1)
Loop
i used the qrydat once, maybe can only use the same field once? first time