Checking for blank fields before saving

Results 1 to 2 of 2

Thread: Checking for blank fields before saving

  1. #1
    Join Date
    Dec 1969

    Default Checking for blank fields before saving

    I am saving a the following from a basic HTML form. I would like to check for all the empty fields and on the next page show the names of empty fields and allow the users to go back and add the data. what would be the best way to do that??<BR><BR><BR>sql="SELECT * FROM Procedures"<BR><BR>set rs = Server.CreateObject("ADODB.Recordset")<BR>rs.OPEN sql, conn, 2, 3<BR><BR>rs.addnew<BR>&#039;rs.fields("Document Level")=Request.Form("Document_Level")<BR>rs.field s("title")=Request.Form("txtTitle")<BR>rs.fields(" ISO section")=Request.Form("txtISO_section")<BR>rs.fie lds("Document_no")=Request.Form("txtDocument_no")< BR>rs.fields("Revision_No")=Request.Form("txtRevis ion_no")<BR>rs.fields("Date Issued")=Request.Form("txtDate_Issued")<BR>rs.fiel ds("Next Review")=Request.Form("txtNext_Review")<BR>rs.fiel ds("Purpose")=Request.Form("txtPurpose")<BR>rs.fie lds("Scope")=Request.Form("txtScope")<BR>rs.fields ("General")=Request.Form("txtGeneral")<BR>rs.field s("procedure")=Request.Form("txtprocedure")<BR>rs. fields("Developed by")=Request.Form("txtDeveloped_By")<BR>rs.fields( "Approved by")=Request.Form("txtApproved_By")<BR><BR>rs.upda te<BR>rs.movelast<BR><BR>response.redirect "create_step7.asp?pid="& rs.fields("PID")<BR>rs.close<BR>set rs=nothing<BR>conn.close<BR>set conn=nothing

  2. #2
    Join Date
    Dec 1969

    Default RE: Checking for blank fields before saving

    I would just use<BR><BR>if request.form("??????????") &#060;&#062; "" then<BR> rs.fields("??????????") = request.form("??????????")<BR>end if

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts