Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Developer Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Google Mapping
Thomas Corbett 
     
2 years ago
I was wondering if anyone could give a little guidance on the VBA code I have below. The intent is to have a query 'Audits' call up addresses and then place their markers in google maps. I have it working my only problem is that it is opening up google maps for each record rather than placing markers for each record in a single map. Any help would be greatly appreciated. The code I have is

Private Sub Command38_Click()
    
    Dim strDetailAddress As String
    Dim strGmaps As String
    Dim db As Database
    Dim rs As Recordset
    
    Set db = CurrentDb()
    Set rs = db.OpenRecordset("Audits", dbOpenDynaset)
    
    While Not rs.EOF
    
        strDetailAddress = Me.StreetAddress & " " & Me.[City/County] & " " & Me.[Zip Code]
        strGmaps = http://maps.google.com/maps?h1=en&q= & strDetailAddress
        CreateObject("Shell.Application").Open CVar(strGmaps)
        
    rs.MoveNext
        
        Wend
        Set rs = Nothing
        Set db = Nothing
    
End Sub
Richard Rost  @Reply  
          
2 years ago
That's exactly what that code is going to do. It's going to open up a separate shell application for each item in your record set. What you want to do is string them together using the technique that Kevin Yip showed in our other conversation. I'm going to do a video on it.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Developer Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/6/2026 11:22:33 AM. PLT: 1s