Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 33
  1. #16
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,250
    Hi there,
    You are overcomplicating it.
    1. No API key needed, you are not trying to interact with the Google maps API interface, you are simply passing a string (URL) to your default browser.
    2. No need, see above.


    3. Not applicable
    4. Look at the code I originally gave you in post 6. strFrom is hardcoded in VBA, strTo comes from your form (Me.[CoordinatediPartenza). Use the strFrom from post
    # 14 (I entered your original address in Google Maps and this is how Google formatted it). For strTo make sure it is also a valid address or place, copy it manually in Google Maps and see how it looks.

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  2. #17
    Luciano71 is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2020
    Posts
    16
    Don't mind it but I am denied in VBA code.I currently have this code tell me in the code line what is missing or what am I wrong?
    Thanks and sorry again


    Private Sub Comando340_Click()
    Dim strFrom As String, strTo As String
    Dim sMyAddress As String, sHomeAddress As String
    On Error Resume Next


    sHomeAddress = "Via Antonio Locatelli 18 Castelli Calepio Bg Italia"
    sMyAddress = Me.[CoordinatediPartenza]
    strFrom = "from: " & sHomeAddress
    strTo = " to: " & sMyAddress


    Application.FollowHyperlink "http://www.google.com/maps?q=" & strFrom & " " & strTo
    End Sub


    He asks you to always use the translator in Google because otherwise what he translates is not understood

  3. #18
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,250
    Can you show me what do you have for Me.[CoordinatediPartenza]? What exactly is in the CoordinatediPartenza textbox on your form?
    Please use:
    strFrom = "Via Antonio Locatelli, 18 24060 Castelli Calepio BG Italy" instead of "Via Antonio Locatelli 18 Castelli Calepio Bg Italia" (note the comma and the postal code)

    Do you get an error and if yes what is the error number and/or description?

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  4. #19
    Luciano71 is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2020
    Posts
    16
    In the field [CoordinatediPartenza] there are the coordinates of a place and for each record there is its coordinate.
    Example...
    N45 ° 57.335 'E9 ° 30.141'


    I could also post the database

    Currently the code is written as follows

    Private Sub Comando340_Click()
    Dim strFrom As String, strTo As String
    Dim sMyAddress As String, sHomeAddress As String
    On Error Resume Next


    sHomeAddress = "Via Antonio Locatelli, 18 24060 Castelli Calepio BG Italia"
    sMyAddress = Me.[CoordinatediPartenza]
    strFrom = "from:" & sHomeAddress
    strTo = " to: " & sMyAddress


    Application.FollowHyperlink "http://www.google.com/maps?q=" & strFrom & " " & strTo
    End Sub

  5. #20
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,250
    Yes, please post the database (zipped).
    Cheers

  6. #21
    Luciano71 is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2020
    Posts
    16
    My zipped file weighs only 297KB but I can't send it.
    The error message is:
    The following errors occurred:
    MontagmaRar: invalid file, compress the file and tray again


    My zipped file weighs only 297KB but I can't send.The error message is:
    The following errors occurred:
    MontagmaRar: Invalid file, please zip your file and tray again

    How can I do?
    I try to send only databases

    I also tried to send only database m it doesn't workI also tried to send only database m it doesn't work
    Is it probably too heavy?

  7. #22
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,250
    You need to use zip format not rar. In any case I think I found your problem. You need to change the way to enter the coordinates:

    Change this:
    N45 ° 57.335 'E9 ° 30.141'
    into this:
    45°57.335'N 9°30.141'E

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  8. #23
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,250
    First time it worked now it says it cannot calculate directions.

    I have change this line of code to:
    Application.FollowHyperlink "https://www.google.com/maps/dir/" & strFrom & "/" & strTo

    Maybe try it with other coordinates. It would help if you could upload the db.
    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  9. #24
    Luciano71 is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2020
    Posts
    16
    Montagna.zip

    Good evening here is the zipped file.

    Good evening here is the zipped file.

  10. #25
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,250
    Hi Luciano,
    Please have a look at the attached file. I have changed the way the coordinates are stored (removed the space between the grades and minutes for both long and lat and moved the letter to the end instead of beginning). I also had to reverse the directions points as it seems Google needs to resolve the one with the coordinates first then show directions to your place. When trying in reverse I was getting errors saying it cannot find directions.

    Cheers,
    Attached Files Attached Files
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  11. #26
    Luciano71 is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2020
    Posts
    16
    Perfect very kind ...
    The only small problem is to have reversed the code of the coordinates as I copied those directly from the hiking program. that way I would have to manually edit them every time, unless there is a way to automatically convert them every time I insert them.

    Sorry again I tried to enter the coordinates as I always did like this ... N46 ° 00.562 'E9 ° 29.511'


    And it seems to work.
    These days I feel it better.


    For now thank you and we will hear from you again if you can help me with the project.

  12. #27
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,250
    Ciao Luciano,

    Please try this version, I have added a query that converts the coordinates into the proper format so you can continue to copy and paste from your hiking program.

    Cheers,
    Vlad
    Attached Files Attached Files
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  13. #28
    Luciano71 is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2020
    Posts
    16
    Hi you are really good and kind. I appreciate your interest in my database. I will also take you into account for the next evolutions.

  14. #29
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,250
    Hi Luciano,
    Here is an updated version that opens the gpx files in its native program (Garmin). Please note that I moved the file one subfolder up as you had it two "Tracce GPX" subfolders deep.
    Cheers,
    Vlad
    Attached Files Attached Files
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  15. #30
    Luciano71 is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2020
    Posts
    16
    Hi Vlad wait work on this file because it's the last one I'm working on. I am attaching the file.
    Sorry you anticipated me at work.
    Very good.Nuovo Progetto Montagna.zip
    This is the evolving program with the start of the project to create a mask to filter the data I put. I did not insert the query you linked to me in the objects because with me the coordinates also work in the original formatting.


    Hi Vlad ... Sorry one more thing ... Yesterday I forgot in a hurry to stop, I didn't tell you that clicking the "Upload GPX File" button the field on the left must return the name of the loaded GPX file. In this way I see the actual upload of the file in the database folder.
    However, I think you guessed it was so.
    Thank you and excuse me. Have a nice Sunday.
    Last edited by Luciano71; 11-08-2020 at 01:48 AM.

Page 2 of 3 FirstFirst 123 LastLast
Please reply to this thread with any new information or opinions.

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