Jump to content
Xtreme .Net Talk

dfcn

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by dfcn

  1. thansk dude... i found the dumb error :D
  2. If mcqChk.Checked = True Then qnManagement.addMCQqn(MCQqnTf.Text, MCQ1.Text, MCQ2.Text, MCQ3.Text, _ MCQ4.Text, corrAnswer) ElseIf fillChk.Checked = True Then qnManagement.addFillQn(fillTf.Text, fillAnsTf.Text) End If this arguement is supposed to call for these 2 method in my module when i click button A Public Function addMCQqn(ByVal quest As String, ByVal ans1 As String, _ ByVal ans2 As String, ByVal ans3 As String, _ ByVal ans4 As String, ByVal corrAns As String) isMCQ(arrPosM) = entryForm.qnNum qnTypes(arrayPos) = "M" arrPosM += 1 mcqQn(arrayPos) = quest mcqAns1(arrayPos) = ans1 mcqAns2(arrayPos) = ans2 mcqAns3(arrayPos) = ans3 mcqAns4(arrayPos) = ans4 correctAns(arrayPos) = corrAns MessageBox.Show("Question Submitted" & vbCr & isMCQ.Length & vbCr & isFill.Length) arrayPos += 1 ReDim Preserve isMCQ(arrPosM) ReDim Preserve isFill(arrPosF) ReDim Preserve isMCQ(arrayPos) ReDim Preserve qnTypes(arrayPos) ReDim Preserve mcqQn(arrayPos) ReDim Preserve mcqAns1(arrayPos) ReDim Preserve mcqAns2(arrayPos) ReDim Preserve mcqAns3(arrayPos) ReDim Preserve mcqAns4(arrayPos) ReDim Preserve correctAns(arrayPos) End Function Public Function addFillQn(ByVal quest As String, ByVal answer As String) isFill(arrPosF) = entryForm.qnNum qnTypes(arrayPos) = "F" arrPosF += 1 fillQn(arrayPos) = quest fillAns(arrayPos) = answer MessageBox.Show("Question Submitted" & vbCr & isMCQ.Length & vbCr & isFill.Length) arrayPos += 1 ReDim Preserve isMCQ(arrPosF) ReDim Preserve fillQn(arrayPos) ReDim Preserve fillAns(arrayPos) End Function for the 1st time..when i press the button A...it is successful..after that when i changed the checked radio button for the second time and click button A..it says the array is out of the index bound...i dont get it...cause when i only have one method..it works fine... anyone knows where the fault lies?
  3. thanks dude you rock :D
  4. is it possible you could do an example? cause really dont know where & how to start about it.
  5. Dim i As Integer For i = 0 To UBound(userManagement.names) If userManagement.names(i) = nameTf.Text Then MessageBox.Show("Name already present in the database" ) Exit For Else nameDis = nameTf.Text userManagement.AddUserPass(firstChar, nameDis) Exit For End If Next userManagement is just a module i made for the storing of values into array. what i'm trying to do is: If the user enters a name into the textbox, and the name is already in the array, then it will show the error message. what the problem is: For the first name i enter (eg. Jim). after i reenter the name again, it shows the error message. But after the first name works, I tried to enter another name (eg. ZC). i can just add the value into the array again and again without showing the error message. anyone can help?
×
×
  • Create New...