>I have created a form with add cmdbutton and a grid. Once I pressed the add button the focus will set to one of the columns in the grid an I will input an itemno and will then replace other data in the other columns when itemno is found. the focus will then go to the qty column for input of quantity. Once I press enter to confirm the focus will go back to add button. This is where the problem start, when I pressed the add button again it will again evaluate the valid and lostfocus of th qty column and will go setfocus back to add button since the qty.lostfocus has setfocus() to add button.
Looks like your qty cell in the grid still has focus to it when you re-push the add button (this is a grid focus problem sometimes)...to test this, try setting the focus from the qty textbox to some intermediary place before returning focus to the button (like a different column/textbox with no valid/lostfocus code)
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.