>Can any one tell me how to set the cursor back to previous text box after I click a command button which is not in tab order ?
You would need to create a form's property oLastActiveControl.
In the When event of command button you would write something like
if type('thisform.ActiveControl')='O' and not isnull(thisform.ActiveControl)
thisform.oLastActiveControl = thisform.ActiveControl
endif
In the command button click you would put after all other code
if not isnull(thisform.oLastActiveControl)
thisform.oLastActiveControl.SetFocus()
endif
If it's not broken, fix it until it is.
My Blog