Hi,
Does anyone knows how to combine navigation command
buttons with Flexgrid (i'm not sure if I state this
correctly), but the idea is if the user clicked on
first, or prev, or next or last buttons, then the record
also moved accordingly on the flexgrid.
am I making any sense? any input would be greately appreciated. as you can see i can create the procedure
for these separately, but I am working to get
them act together, and so far it has not working.
my code for the flexgrid on click is this:
private sub flexgrid_click()
dim i as interger
dim x as interger
x = flexgrid.row
flexgrid.selectionmode = flexselectionbyrow
with flexgrid
for i = 1 to x
text1.text = flexgrid.textmatrix(i,1)
next
end with
end sub
code for navigation button:
private sub navbuttons()
dim i as integer
for i = 0 to 3
cmdnavigate(i).enabled = true
next
private sub cmdnavigate_click(index as integer)
with rs(i already created a recordset to populate the flexgrid, here I am not sure I have to rewrite the sql
again to re-create the same recordset again),
select case index
case 0
.movefirst
case 1
if not .bof then .movefirst
else
.moveprevious
case 2
if not .eof then .movenext
else
.movelast
case 3
.movelast
end select
end with
Does anyone knows how to combine navigation command
buttons with Flexgrid (i'm not sure if I state this
correctly), but the idea is if the user clicked on
first, or prev, or next or last buttons, then the record
also moved accordingly on the flexgrid.
am I making any sense? any input would be greately appreciated. as you can see i can create the procedure
for these separately, but I am working to get
them act together, and so far it has not working.
my code for the flexgrid on click is this:
private sub flexgrid_click()
dim i as interger
dim x as interger
x = flexgrid.row
flexgrid.selectionmode = flexselectionbyrow
with flexgrid
for i = 1 to x
text1.text = flexgrid.textmatrix(i,1)
next
end with
end sub
code for navigation button:
private sub navbuttons()
dim i as integer
for i = 0 to 3
cmdnavigate(i).enabled = true
next
private sub cmdnavigate_click(index as integer)
with rs(i already created a recordset to populate the flexgrid, here I am not sure I have to rewrite the sql
again to re-create the same recordset again),
select case index
case 0
.movefirst
case 1
if not .bof then .movefirst
else
.moveprevious
case 2
if not .eof then .movenext
else
.movelast
case 3
.movelast
end select
end with