Looping an addNew

Results 1 to 2 of 2

Thread: Looping an addNew

  1. #1
    Join Date
    Dec 1969

    Default Looping an addNew

    This is probably a stupid question with a simple answer but when you don&#039;t know well...<BR><BR>This code works fine if the user fills in all 6 fields on the form. But if not an error results. How do you do a conditional statement tha tinserts snum 1 to 6 only if they have data? <BR><BR>For snum = 1 To 6<BR> skill_id = Request("n" & snum)<BR> RS.AddNew<BR> RS("Ind_id") = niid<BR> RS("skill_id") = skill_id<BR> RS.Update <BR>Next

  2. #2
    Join Date
    Dec 1969

    Default Uh maybe check the value before you

    do your insert?!<BR><BR>If len(trim(skill_id )) &#062; 0 then<BR><BR> ..do your addnew stuff <BR>end if<BR><BR>This is basic stuff.

Posting Permissions

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