Results 1 to 6 of 6
  1. #1
    CHEECO is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2016
    Posts
    156

    runtime error 6n overflow

    Hello all. I have been using google map viewer bay James bell for some time now, and for some reason I am now get a runtime error6 overflow.



    This line of the below code is highlited in yellow

    MyError = Err.Number - vbObjectError - 513




    Code:
    Option Compare Database
    Dim WithEvents Map As GoogleMaps
    Private Sub Command1_Click()
    On Error GoTo ErrCatch
        Map.StartMap
        Map.GeocodeAddress address, All
        Exit Sub
    ErrCatch:
        Dim MyError As Integer
        MyError = Err.Number - vbObjectError - 513
        
        If MyError = 602 Then
            MsgBox "The Address you entered could NOT be found." & vbNewLine & _
                "Please enter another address", vbOKOnly, "NO ADDRESS FOUND"
        End If
    End Sub
    Private Sub Form_Load()
        Set Map = New GoogleMaps
        Set Map.SetWebBrowser = Me.WebBrowser0
    End Sub
    Thank-you

    Cheeco

  2. #2
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    You may be exceeding the range of values for Integer. Try Dim MyError as Long

  3. #3
    CHEECO is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2016
    Posts
    156
    I tried the Dim MyError as Long and that did not work. The "Take me there" button does not work at all.

  4. #4
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    I think the Dim MyError as Long actually did work, because the overflow error went away. But the reason you were getting that error in the first place was because the error handler was catching an error - what it was you don't know yet, but you can be sure it was caused by line 3 or 4 of the procedure.

    The "Take me there" button does not work at all.
    You don't really know what it's doing. Your code has error handling - as it should - but if you get any error other than 602, you won't know it because no error message is produced. You need to add an else part to the error handler to cover any other error that may occur.
    Last edited by John_G; 06-11-2016 at 12:20 AM. Reason: additional remarks

  5. #5
    CHEECO is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2016
    Posts
    156
    I am having no luck with it. I have attached a copy of the file. I reinstalled Office and now I am getting the "To help protect your security, you web browser has restricted this file from showing active content that could access your computer" error again. I am wondering if that is creating the problem.
    Attached Files Attached Files

  6. #6
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    Sounds like your browser security level is set too high. Try lowering it to allow active content to run.

    I think you may have an error in your file googlemaps.html. When I try to run it, it gives me a script error that says "Google" is not defined, and says it is in that file ("url"). I suspect that error has a cascade effect to cause the other ones.

    Sorry I can't help much more than that, because I know very little about scripting.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Overflow error
    By Thistle in forum Queries
    Replies: 6
    Last Post: 12-12-2015, 02:57 PM
  2. Overflow Error
    By jtm013 in forum Programming
    Replies: 15
    Last Post: 01-07-2015, 01:01 PM
  3. Overflow Error
    By pj33558 in forum Reports
    Replies: 1
    Last Post: 06-19-2014, 10:50 AM
  4. Overflow Error
    By mike02 in forum Programming
    Replies: 14
    Last Post: 07-12-2013, 10:53 AM
  5. OverFlow Error.
    By Coffee in forum Import/Export Data
    Replies: 5
    Last Post: 08-17-2011, 05:44 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums