G
Guest
hi
i have a SQl string in a code like the one belo
dim db as DAO.databas
dim rs as DAO.recordse
dim strSQl as strin
set db= currentD
strSQL = "Select * from Table1 where ((Table1.field1 < " & me.textbox1 & "));
set rs = db.openrecordset(strSQL
rs.movefirs
code = rs!p
rs.movelas
---------------------------------------------
it's a normal criteria comparing a field from the table with a field from my form.
the way the code is written, it will get the first occurence and will store in variable cod
this will go tiil the last record with a few more occurences.
however, when there is no occurences (the strSQL dont produce any result) i want tha
at least the last record will be displayed
And that's my problem. I don't know how can i handle and control the last record in a way
can get the values from my recordset and store them in my form.
maybe it's a simple issue and i am complicating it.
Can anybody helps me
Thank
Zeca Nogueira
However , when there
i have a SQl string in a code like the one belo
dim db as DAO.databas
dim rs as DAO.recordse
dim strSQl as strin
set db= currentD
strSQL = "Select * from Table1 where ((Table1.field1 < " & me.textbox1 & "));
set rs = db.openrecordset(strSQL
rs.movefirs
code = rs!p
rs.movelas
---------------------------------------------
it's a normal criteria comparing a field from the table with a field from my form.
the way the code is written, it will get the first occurence and will store in variable cod
this will go tiil the last record with a few more occurences.
however, when there is no occurences (the strSQL dont produce any result) i want tha
at least the last record will be displayed
And that's my problem. I don't know how can i handle and control the last record in a way
can get the values from my recordset and store them in my form.
maybe it's a simple issue and i am complicating it.
Can anybody helps me
Thank
Zeca Nogueira
However , when there