James Bell google maps for access error

CHEECO

New member
Local time
Yesterday, 21:48
Joined
Mar 27, 2016
Messages
6
I am using James Bell's google map for access and I keep getting the following error when I move the curser or mouse over the map. I close the error and tell I don't want to keep running the script but the error pops right back up again. I have disable script checking in my browser and that has not helped either. I have attached a pic of the error

Does anyone know how to fix this problem? I am using window 10 and windows 8.1 on laptop and it does it on both. I am using access 2016 32bit.
 
Last edited:
all the forms on his sample has an event on OnLoad.
insert a code before creating a New instance of GoogleMaps, ie:

Me.WebBrowser6.Object.Silent = True
Set oMap = New GoogleMaps

'====
replace with correct name the blue-colored one in the code. also oMap there is just an example, it may vary in his actual code.

btw, the code will only suppress the error msg from appearing, the bug has not been resolved as of to date.
 
Last edited:
Ok I am not sure what you are trying to say. I don't am not well versed at this type of thing. where do I find this code that has to be changed. This is the code for the start form.

Code:
Option Compare Database
Dim WithEvents DirectionsMap As GoogleMaps
Dim adoSteps As ADODB.Recordset
 Private Sub DirectionsMap_DirectionsLoaded(Status As Integer, RoutesRS As ADODB.Recordset, StepsRS As ADODB.Recordset)
    Set Me.lstRoutes.Recordset = RoutesRS
    Set Me.lstSteps.Recordset = StepsRS
    Set adoSteps = StepsRS
End Sub
 
Private Sub Form_Load()
    Set DirectionsMap = New GoogleMaps
    Set DirectionsMap.SetWebBrowser = Me.WebBrowser6
    
    DirectionsMap.SimpleDirections "New York, NY", "Chicago, Il", "Dallas, TX", "Las Vegas, NV", "Seattle, WA"
End Sub
 Private Sub lstRoutes_Click()
    adoSteps.Filter = "RouteID = " & lstRoutes.Value
    Set Me.lstSteps.Recordset = adoSteps
End Sub

Thank-you
 
Code:
Private Sub Form_Load()
 [COLOR=Blue]   Me.WebBrowser6.Object.Silent = True[/COLOR]
    Set DirectionsMap = New GoogleMaps
    Set DirectionsMap.SetWebBrowser = Me.WebBrowser6
    
    DirectionsMap.SimpleDirections "New York, NY", "Chicago, Il", "Dallas, TX", "Las Vegas, NV", "Seattle, WA"
End Sub
 Private Sub lstRoutes_Click()
    adoSteps.Filter = "RouteID = " & lstRoutes.Value
    Set Me.lstSteps.Recordset = adoSteps
End Sub

you modify all the form's Load event like the above.
 
Thank-you That solved the problem. It is working fine now.
 
I have run into another problem. When I copied the map viewer over to my database It no longer works. I am getting an error "Performance Appraisal" The expression on load you entered as the event property setting produced the following error "User defined type not defined" I am guessing her but I think it is with the map viewer form because the map viewer with the page "Google Maps by James Bell does not come up like it is suppose to.

I have attached a copy of the code from the map viewer form.

Code:
Option Compare Database
 Private Sub Form_Resize()
    On Error Resume Next
    Me.MapContainer.Height = Me.WindowHeight - 530
    Me.MapContainer.Width = Me.WindowWidth - 130
    Me.Form.Width = Me.WindowWidth - 130
    Me.Detail.Height = Me.WindowHeight - 530
End Sub

This is the code from the Start form page

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()
Me.WebBrowser0.Object.Silent = True
    Set Map = New GoogleMaps
    Set Map.SetWebBrowser = Me.WebBrowser0
End Sub

Thank-you
 
you must copy also the Class and modules that depends on it.
 
When I copy it over I copy all the files over that are in the folder and then copy all the modules, forms, and tables that there are. But when I try to open the map viewer the form open but the window does not pop up for the map view.
 

Users who are viewing this thread

Back
Top Bottom