runtime error 6 overflow

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • creative1
    Contributor
    • Sep 2007
    • 274

    runtime error 6 overflow

    Hi all.
    I got a problem in my .exe version of the software. I created package wizard. For one command button, it displays messge "Cancel transaction". When I click OK, program crashes and displays following message "Runtime error 6 overflow". I don't see any error in programming version of the software. Why is package? I am using this software on same machine where I am programming. I also tried this on separate machine and get same message.
    Any ideas?
    Regards
    Farhana
  • QVeen72
    Recognized Expert Top Contributor
    • Oct 2006
    • 1445

    #2
    Hi,

    can u post what Code is there in that Command_Click Event..?


    Regards
    Veena

    Comment

    • creative1
      Contributor
      • Sep 2007
      • 274

      #3
      I click on exit button. the problem is with form unload. again I don't get error in programming version


      Private Sub btnExit_Click()
      Unload Me
      End Sub


      ===========
      Private Sub Form_Unload(can cel As Integer)
      If lvprod.ListItem s.Count > 0 Then
      MsgBox "Active transaction detected" + vbCrLf + "please cancel or continue transaction" + vbCrLf + "to close this form", vbExclamation, "Active Trans"
      cancel = Not Me
      End If

      End Sub

      Comment

      • QVeen72
        Recognized Expert Top Contributor
        • Oct 2006
        • 1445

        #4
        Hi,

        What is this :
        cancel = Not Me ....?

        If you dont want to Unload then give :

        Cancel = True

        And in your msgBox, you have to specify OK-Cancel, or Yes-No-Cancel buttons..

        Depending on what the user clicks, you need to take necessary action

        REgards
        Veena

        Comment

        • Killer42
          Recognized Expert Expert
          • Oct 2006
          • 8429

          #5
          Yes, the keyword Me refers to a copy of the form. The Not expression is used to produce the opposite of a boolean (True/False) condition. You can hardly expect to use it to produce the opposite of a form.

          Comment

          • creative1
            Contributor
            • Sep 2007
            • 274

            #6
            thanks guys. Me was the problem. I fixed it.

            Comment

            Working...