Hi Guy's I have since tried this to add the forward slashes, also moved the URL command outside the loop, now only getting 1 post code when i have checked 6 in recordset ?
I though that If i moved the URL outside of the loop would result in opening 1 x URL which is correct, just now need to rsPC string for all records checked ?
Code:
Dim myURL As String, OpenChrome As String, rsPC As StringDim iQty As Integer
Dim pc1 As String, pc2 As String, pc3 As String, pc4 As String, pc5 As String
Dim rs As DAO.Recordset
Set rs = CurrentDb.OpenRecordset("Select * From tblRemovals WHERE AddToRoute = Yes")
Do Until rs.EOF
rsPC = Replace(Replace(rs.Fields("PostCode"), " ", ""), rs.Fields("Postcode"), rs.Fields("PostCode") & "/")
rs.MoveNext
Loop
' myURL = "https://www.google.co.uk/maps/dir/" & Replace(Replace(rsPC, " ", ""), rsPC, rsPC & "/")
myURL = "https://www.google.co.uk/maps/dir/" & rsPC
OpenChrome = """C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"""
Shell OpenChrome & myURL, vbMaximizedFocus