>I want to make simple in my program ....
>Anybody can correct my program please ... ?
> For mSize = 1 To 14
> mstrsize = Right("0" + LTrim(Str(mSize)), 2) ' returns 01 - 14
> mqty = "QTY" & mstrsize ' returns QTY01 - QTY14
> mmSize = Qtylist.Recordset("'" & mqty & "'") ' the problem
> msgbox mmSize ' to show one by one Qty from Qty01 - Qty14
> Next mSize
First, if you want to display your code exactly how it is typed, enclose the code between <pre>
and </pre>
Second, in the line
mmSize = Qtylist.Recordset("'" & mqty & "'")
you are sending the Recordset object the string 'QTY01', etc. It appears you want to access a field value from a database table or query. The way you are doing it assumes your recordset has fields names QTY01 up to QTY14.
If that is the case, the line should be:
mmSize = Qtylist.Recordset(mqty)
Does that help?
best,
jody
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement