Chandan,
if your code is in keypress event on textbox you can't use
THIS.PARENT.COMMAND1.Enabled
...
Use
ThisForm.Commandgroup1.Command1.Enabled = .f.
ThisForm.Commandgroup1.Command2.Enabled = .t.
...
>Dear Vladidimir
>
>Thanks for the solution,it solved my problem.Now I have made some change in the form and used the Ist part.To activate the disabled command button I write code at the last text and these are as follows:
>
>LPARAMETERS nKeyCode, nShiftAltCtrl
>IF nKeycode=13
>THIS.PARENT.COMMAND1.Enabled=.f.
>THIS.PARENT.COMMAND2.Enabled=.T.
>THIS.PARENT.COMMAND3.Enabled=.T.
>THIS.PARENT.COMMAND4.Enabled=.T.
>THIS.PARENT.COMMAND5.Enabled=.T.
>THIS.PARENT.COMMAND6.Enabled=.T.
>THIS.PARENT.COMMAND7.Enabled=.T.
>THIS.PARENT.COMMAND8.Enabled=.T.
>endif
>
>
>My logic is that after ending the data input the disabled command will be enabled and the enabled command button will be disabled.But it is not working.Please help.
>
>Chandan
_______________________________________________________________
Testing displays the presence, not the absence of bugs.
If a software application has to be designed, it has to be designed correctly!
_______________________________________________________________
Vladimir Zografski
Systems Analyst