General information
Category:
Forms & Form designer
What does not work in your code? Go top in person?This.Parent.Command1.ENABLED = .F. ? Or it gives you an error? If so, what is the error meessage? Please, give details.
>>>>>>>>>>>>>>>Your message below
I had these codes working fine all along, until now it is not working? I don't understand? Sorry, but I am posting the codes below to see if you spot something wrong... (again, it was working very well before, until now?) all in the ClickEvent of the button:
** for ( |< ) button **
GO TOP IN person
This.Parent.Command1.ENABLED = .F.
This.Parent.Command2.ENABLED = .F.
This.Parent.Command3.ENABLED = .T.
This.Parent.Command4.ENABLED = .T.
ThisForm.REFRESH
** for ( < ) button **
SELECT person
IF NOT BOF()
SKIP -1
ENDIF
IF BOF()
GO TOP
ENDIF
nw = RECNO()
GO TOP
bg = RECNO()
GO BOTTOM
ed = RECNO()
GOTO nw
DO CASE
CASE nw = bg
This.Parent.Command1.ENABLED = .F.
This.Parent.Command2.ENABLED = .F.
This.Parent.Command3.ENABLED = .T.
This.Parent.Command4.ENABLED = .T.
CASE nw = ed
This.Parent.Command1.ENABLED = .T.
This.Parent.Command2.ENABLED = .T.
This.Parent.Command3.ENABLED = .F.
This.Parent.Command4.ENABLED = .F.
OTHERWISE
This.Parent.Command1.ENABLED = .T.
This.Parent.Command2.ENABLED = .T.
This.Parent.Command3.ENABLED = .T.
This.Parent.Command4.ENABLED = .T.
ENDCASE
ThisForm.REFRESH
** for ( > ) button **
SELECT person
IF NOT EOF()
SKIP 1
ENDIF
IF EOF()
GO BOTTOM
ENDIF
nw = RECNO()
GO TOP
bg = RECNO()
GO BOTTOM
ed = RECNO()
GOTO nw
DO CASE
CASE nw = bg
This.Parent.Command1.ENABLED = .F.
This.Parent.Command2.ENABLED = .F.
This.Parent.Command3.ENABLED = .T.
This.Parent.Command4.ENABLED = .T.
CASE nw = ed
This.Parent.Command1.ENABLED = .T.
This.Parent.Command2.ENABLED = .T.
This.Parent.Command3.ENABLED = .F.
This.Parent.Command4.ENABLED = .F.
OTHERWISE
This.Parent.Command1.ENABLED = .T.
This.Parent.Command2.ENABLED = .T.
This.Parent.Command3.ENABLED = .T.
This.Parent.Command4.ENABLED = .T.
ENDCASE
ThisForm.REFRESH
** for ( >| ) button **
GO BOTTOM IN person
This.Parent.Command1.ENABLED = .T.
This.Parent.Command2.ENABLED = .T.
This.Parent.Command3.ENABLED = .F.
This.Parent.Command4.ENABLED = .F.
ThisForm.REFRESH
If all seems fine, then I would know that it is something else, but I looked around and didn't see... ????
Chuck
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only