M
MB
I have a piece of code I am working on in a mdb (front end for a SQL
database)
----------------------------------------------
Set rst = db.OpenRecordset(SQLStmt, dbOpenSnapshot)
numrecs = rst.RecordCount()
Select Case numrecs
Case Is = 1
rst.MoveFirst
Do Until rst.EOF = True
MsgBox rst("invoice number")
rst.MoveNext
Loop
Case is > 1
do other stuff
end select
-------------------------------------------------
Examining rst.RecordCount() in the debugger, it is actually 11 as evidenced
by the loop executing 11 times, but numrecs is 1 , also as evidenced by the
fact that the loop executes at all.
I have another similar situation, where the variable on the left does not
equal the right after the assignment. I realize my memory (the biological
one) is toast, but am I missing something here?
Thanks in advance,
Marc Berman
database)
----------------------------------------------
Set rst = db.OpenRecordset(SQLStmt, dbOpenSnapshot)
numrecs = rst.RecordCount()
Select Case numrecs
Case Is = 1
rst.MoveFirst
Do Until rst.EOF = True
MsgBox rst("invoice number")
rst.MoveNext
Loop
Case is > 1
do other stuff
end select
-------------------------------------------------
Examining rst.RecordCount() in the debugger, it is actually 11 as evidenced
by the loop executing 11 times, but numrecs is 1 , also as evidenced by the
fact that the loop executes at all.
I have another similar situation, where the variable on the left does not
equal the right after the assignment. I realize my memory (the biological
one) is toast, but am I missing something here?
Thanks in advance,
Marc Berman