I have a form with 30 command buttons on, these are command1, command2 ..... etc. These buttons are only visible if there is a record in a file no 1 to 30. IE if record 1 exist command1 is visible, if record 2 exist command2 is visble etc. Is there some code where I can change a property on a command button by using a variable for the name.
eg I know the code below doesn't work but can I use something similar
select cp_squad
goto top
do while !eof()
nTMPNUM = CP_SQUAD.SYSREF
sCOMMANDBUT = "COMMAND" + STR(nTMPNUM)
THISFORM.sCOMMANDBUT.VISIBLE = .T.
enddo
eg I know the code below doesn't work but can I use something similar
select cp_squad
goto top
do while !eof()
nTMPNUM = CP_SQUAD.SYSREF
sCOMMANDBUT = "COMMAND" + STR(nTMPNUM)
THISFORM.sCOMMANDBUT.VISIBLE = .T.
enddo