Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Required field validation function

Status
Not open for further replies.

uncleroydee

Technical User
Nov 28, 2000
79
US
I'm creating a form to insert record(s) to a SQL database via a stored procedure and plan to allow the users to insert between 1 and 15 records in one submission. This raises three issues for me.

First, each record must contain a specific field, let's call it a part number, so I need to build a validation function that fires an alert if a user tries to enter data into any field without first entering the part number on the same row.

I have named the fields
1Part_No, 1Description, 1Quantity...
2Part_No, 2Description, 2Quantity...
3Part_No, 3Description, 3Quantity...

I will write 15 functions if necessary, but I would think that it is possible to have one function perform the validation on a row by row basis.

Second, I cannot have any empty rows between populated rows so I need to fire an alert when someone attempts to enter data in 3Part_No when 2_Part_No is empty.

The third issue is about executing the stored procedure. I'll address that in a seperate post.

Thanks for your time, I welcome all suggestions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top