USING VB 6.0
How to select previous row value?
Am Selecting a Date between fromdate and todate using date picker
Code
Dim stdate, endate as string
stdate = Fromdate
endate = todate
Example:
fromdate: 01-01-2009
todate: 01-06-2009
Data’s will display fromdate to todate.
I want to select previous date means previous row value. How to select previous row value?
We cannot give
stdate = - fromdate
endate = - todate
It will display a data’s between 31-01-2008 to 31-05-2009
We cannot give
Stdate = <fromdate
endate = < todate
It will display a data’s before 01-01-2009 and also we cannot use > in between condition
Stdate = fromdate (Here how can I give “from previous row value of the fromdate”)
endate = todate (here how can I give “to previous row value of the todate”)
Example:
id, date, name
01, 02-01-2009, raja
01, 04-01-2009, raja
02, 04-01-2009, ravi
so on.....
01, 28-05-2009, raja
01, 31-05-2009, raja
so on...
am selecting a date stdate = 04-01-2009, endate= 31-05-2009
Output shoud display like this -
01, 02-01-2009, raja
01, 04-01-2009, raja
02, 04-01-2009, ravi
.......
01, 28-05-2009, raja
It should dipslay one record Before ssdate and endate.
How to select previous row value?
Need Help in VB 6 code.