Results 1 to 6 of 6

Thread: SORRy for being pathetic. but i need help

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2003
    Posts
    13

    SORRy for being pathetic. but i need help

    how can i handle errors here? i encounter lots of em.

    also, im very sorry. im only a self-taught student and am just starting out. so please be patient. TIA.
    VB Code:
    1. Private Sub datPrimaryRS_Error(ByVal ErrorNumber As Long, Description As String, ByVal Scode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, fCancelDisplay As Boolean)
    2.   'This is where you would put error handling code
    3.   'If you want to ignore errors, comment out the next line
    4.   'If you want to trap them, add code here to handle them
    5.  
    6. End Sub

  2. #2
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385
    Wendy_Clear


    Lots of errors? Just what kind of errors do you get?

  3. #3

    Thread Starter
    New Member
    Join Date
    Sep 2003
    Posts
    13
    it says "errors occured".

  4. #4
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385
    Wendy_Clear

    It always helps to have the complete error message and what you were doing at the time, Even the section of code you were in would help.

    A vague question gets a vague answer.

  5. #5

    Thread Starter
    New Member
    Join Date
    Sep 2003
    Posts
    13
    its like this. when i start the program, it says "Type Mismatch" which is directed to my validation code for the program. after that, it says "Invalid Procedure Call or Arguement". Then when i do something like saving a record, it says "Errors Occured" but still saves my record. why is this? i cant find anything wrong with my code...

    VB Code:
    1. Private Sub Adodc1_WillMove(ByVal adReason As ADODB.EventReasonEnum, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
    2.  
    3. On Error GoTo error
    4.     'If save = True Or Action = vbDataActionUpdate Or Action = vbDataActionUnload Or Action = vbDataActionAddNew Or Action = vbDataActionMoveNext Or vbDataActionMoveLast Or vbDataActionMoveFirst Or vbDataActionMovePrevious Then
    5.    
    6.     'pilyido
    7.     If txtln = "" Then
    8.     strMsg = "You must enter last name!" & Chr(13)
    9.     txtln.SetFocus
    10.     End If
    11.                
    12.     'ngalan
    13.     If txtfn = "" Then
    14.     strMsg = "You must enter first name!" & Chr(13) & strMsg
    15.     txtfn.SetFocus
    16.     End If
    17.    
    18. ...
    19.  
    20. If txtcn1 = "" And txtcn2 = "" Then
    21.     strMsg = "Must enter at least one contact number!" & Chr(13) & strMsg
    22.     txtcn1.SetFocus
    23.     End If
    24.    
    25.     If txtrn = "" Then
    26.     strMsg = "Must enter a record number!" & Chr(13) & strMsg
    27.     txtrn.SetFocus
    28.     End If
    29.    
    30.     If strMsg <> "" Then
    31.     enumMsgResult = MsgBox(strMsg, vbExclamation + vbOKCancel + vbDefaultButton1)
    32.     adStatus = adStatusCancel
    33.     End If
    34.  
    35. Exit Sub
    36. error:
    37.     MsgBox Err.Description

  6. #6
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385
    Wendy_Clear

    No much info. What you can do is to open your project in VB. Go to Tools->Options->General and select to Break on All Errors. Then run your program and see where it stops. Then I would have a reference to what exactly is the start of your problems.

Posting Permissions

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



Click Here to Expand Forum to Full Width