>Is there a standard way to validate data entry for numeric decimal data? Numbers like 5.5 or 6.25? I only need to check that it is a number.
>
>The data is enterred in a text box with a control source value set to 0.(texbox.controlsource = mvar, mvar = 0) If I use no input mask,control jumps to the next control as soon as the decimal point is enterred. If I use an input mask of 99.99, an entry of 6.25 results in a value of 60.25. If I change the data type to string, I need a way to trap all non numeric or decimal point data.
Hi Karl
You can validate the data against s specific content requirement in the Valid() method of the textbox control, returning .F. if the value content is not correct, or better yet, putting in the correct format on the fly.
Another choice for you might be to use one of the numeric_text_box classes -- there are a couple of good examples in the files section (the filebox upper left) of this forum.
This provide for data entry like a calculator and are specifically formatted for numbers.
lots of luck
regards,
Jim Edgar
Jurix Data Corporation
jmedgar@yahoo.comNo trees were destroyed in sending this message. However, a large number of electrons were diverted from their ordinary activities and terribly inconvenienced.