Please bounce some ideas my way about how to check data from a form's elements before they're saved to a database!
To be more specific:
I have an "edit" page that displays a record, with each field in a textbox. However some fields, like the dates, have size limits or are specific types (Date/Time) in the database, and therefore those fields need to be checked before they're sent to the database and an error is generated. Right now the form action posts to a second "updated" page that calls an "updateRecord" sub and simply displays a message that the record has been updated. Ideally, if something needs changed on the form, it won't go to the second page at all, but might display some text at the top/bottom of the form or in a pop-up stating what's wrong. Then when the page is submitted, and everything checks out okay, it will open a recordset and update the record.
Any suggestions?? My brain's out of steam on this one...
To be more specific:
I have an "edit" page that displays a record, with each field in a textbox. However some fields, like the dates, have size limits or are specific types (Date/Time) in the database, and therefore those fields need to be checked before they're sent to the database and an error is generated. Right now the form action posts to a second "updated" page that calls an "updateRecord" sub and simply displays a message that the record has been updated. Ideally, if something needs changed on the form, it won't go to the second page at all, but might display some text at the top/bottom of the form or in a pop-up stating what's wrong. Then when the page is submitted, and everything checks out okay, it will open a recordset and update the record.
Any suggestions?? My brain's out of steam on this one...