C
cwaters
Guest
To simplify textbox validation on my unbound forms, in my Form_Load event I create an empty recordset based on the table that will be written to, and then I set each textbox's .InputMask property as follows:
...
txtCity.InputMask = String(rsContact!City, "C")
...
This results in a data-driven size limit that matches the field, limiting the user from entering more text than can be stored in the database. This is the closest I've been able to come to imitating the built-in input mask functionality that bound forms provide.
As the end-user tabs into each textbox however, an undesirable (IMO) string of underlines appears as the user types. If the user uses their mouse to click in the textbox and then start typing, the characters appear where they clicked. This is cumbersome and seems to confuse the user. And on multi-line textboxes, words typed in appear on the second line, then jump to the first line when the user presses the spacebar.
I can't help but wonder if there's a better way to handle field validation. What have others found to be of use? And what about non-text fields--say, dates, numerics, and currency? Thanks!
Chris
...
txtCity.InputMask = String(rsContact!City, "C")
...
This results in a data-driven size limit that matches the field, limiting the user from entering more text than can be stored in the database. This is the closest I've been able to come to imitating the built-in input mask functionality that bound forms provide.
As the end-user tabs into each textbox however, an undesirable (IMO) string of underlines appears as the user types. If the user uses their mouse to click in the textbox and then start typing, the characters appear where they clicked. This is cumbersome and seems to confuse the user. And on multi-line textboxes, words typed in appear on the second line, then jump to the first line when the user presses the spacebar.
I can't help but wonder if there's a better way to handle field validation. What have others found to be of use? And what about non-text fields--say, dates, numerics, and currency? Thanks!
Chris