Here's the problem: I have 4 command buttons on a main form. what happens is that on a main form I have sub forms that open on a click of these command buttons, when data is added in the sub form I close it and disable the cmd button on the main form so no more data can be added to that particular subform. I have to shift the focus to the next button to be able to disable it.
if I try to shift it to cmd2 and this is already disabled then I get an error. I need to say something like:
if cmd2.enabled = false
then do.cmd.gotocontrol"[cmd3]"
else do.cmd.gotocontrol"[cmd2]"
If cmd3enabled =false
then do.cmd.gotocontrl"[cmd4]" and so on
But command buttons 2+ 3 might be disabled so I'll have to go to button 4.
Any help would be greaatly appreciated.
if I try to shift it to cmd2 and this is already disabled then I get an error. I need to say something like:
if cmd2.enabled = false
then do.cmd.gotocontrol"[cmd3]"
else do.cmd.gotocontrol"[cmd2]"
If cmd3enabled =false
then do.cmd.gotocontrl"[cmd4]" and so on
But command buttons 2+ 3 might be disabled so I'll have to go to button 4.
Any help would be greaatly appreciated.