>I have an object e.g. a TextBox, with a valid for only certain values.
>While in the Valid, the user may click a close form button.
>The TextBox Valid code doesn't allow the user to continue, unless the TextBox is validated.
>If using a toolbar, I can set a property so that the valid can know that I want to quit.
>I don't know how to do this with a command button.
>The problem with a ToolBar is that I can not attache it to a form.
>
>How would I get a ToolBar attached to a form?
>
>Any Ideas?
>
>Shlomo
You can't attach a tool bar to a form.
One idea that comes to mind would be to have the valid ask the user if they want to exit in the event of an invalid result. The downside to this would be that any time the user tried to exit the textbox if the value of the textbox is invalid they're going to get your message.
Another idea would be to test for the key combination pressed so the user could for example hit Ctrl+Tab to exit the field withoug validating.
Just some thoughts on the subject ...
Jason
Jason Tryon
Senior Systems Analyst / Technical Lead
eBusiness / iPage