I am mapping a few locations and I only want to display the pushpin.note. The location balloon also displays the address. Any help would be great. I am using the following code:
Code:Sub MapSelectedProperties() 'Map the selected properties On Error GoTo MapSelectedProperties_Err_Exit Dim db As Database Dim rstProps As Recordset Dim objLoc As MapPoint.Location Dim objMap As MapPoint.Map Dim objPushpin As MapPoint.Pushpin Dim strMsg As String Dim i As Integer i = 0 Set db = CurrentDb() 'Load the selected properties into a recordset Set rstProps = db.OpenRecordset("SELECT * FROM tblProperties WHERE ysnSelected = Yes;") 'Make sure at least one property was selected If rstProps.RecordCount > 0 Then 'Load Map If LoadMap() Then 'Open the form containing the map FormOpen "frmMap" Set objMap = gappMP.ActiveMap 'Place a pushpin on the map for each selected property While Not rstProps.EOF i = i + 1 Set objLoc = objMap.FindAddressResults(rstProps!strStreet, rstProps!strCity, rstProps!strState, rstProps!strPostalCode)(1) Set objPushpin = objMap.AddPushpin(objLoc, rstProps!strStreet) objPushpin.Name = CStr(i) objPushpin.Note = rstProps!curListPrice & " " & "Total Machines: " & rstProps!machinecount objPushpin.BalloonState = geoDisplayBalloon objPushpin.Symbol = 4 objPushpin.Highlight = True rstProps.MoveNext Wend 'Show all pushpins on the map display objMap.DataSets.ZoomTo Else strMsg = "Unable to load map." MsgBox strMsg, vbOKOnly + vbExclamation, APP_NAME End If Else strMsg = "No properties selected." MsgBox strMsg, vbOKOnly + vbExclamation, APP_NAME End If MapSelectedProperties_Err_Exit: On Error Resume Next Set objPushpin = Nothing Set objLoc = Nothing Set objMap = Nothing rstProps.Close db.Close Exit Sub MapSelectedProperties_Err: Resume MapSelectedProperties_Err_Exit End Sub