MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Error in VBA automation of MapPoint when PO BOX is found

This is a discussion on Error in VBA automation of MapPoint when PO BOX is found within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hello everyone, Okay, I have a quick question for all of you. I'm using VBA in access to create maps... ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-08-2003
Junior Member
Yellow Belt
 
Join Date: Jul 2002
Posts: 12
Send a message via ICQ to JPeters Send a message via AIM to JPeters
Error in VBA automation of MapPoint when PO BOX is found

Hello everyone,
Okay, I have a quick question for all of you. I'm using VBA in access to create maps... and my maps will appear fine with pushpins in the location of each record... however, if the automation process comes upon a single PO BOX in the address field of a record- Access stops the mapping process and delivers an error message... I was wondering if any of you know a solution to this problem.

I had considered writing an algorithm that checks the first 6 chars of the address string and sees if it's "PO BOX" or "PO BIN", but unfortunately I'm a much better java programmer than a VBA programer, and I'm not very good at manipulating the string object class in VBA. I could write the code in java in less than a minute so it can't be too tough to write in VBA. Has anyone ever done something like this and could throw the snippit of code my way? Otherwise I'm going to start hittin the books and read up on VBA strings.

I'm hoping that there is an easier way to do this... Considering only 15 of the records in about 5000 have po box in the address field, this is a pain for such little benefit, but it has to be done. Maybe I can write some sort of a query, I don't know... I just need a good shove in the right direction. Thanks much.

-Josh
__________________
---------------------------
-JPeters-
jpeters@guidemail.com
---------------------------
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 01-09-2003
Junior Member
Yellow Belt
 
Join Date: Jul 2002
Posts: 12
Send a message via ICQ to JPeters Send a message via AIM to JPeters
Fixxed it ... well, this is a simpler fix for my direct problem since I'm only fixing 15 records and any records post this date will not allow po boxes to be entered in the address field... so this works for me. But I might suggest a more extensive solution for someone with a more elaborate problem. Perhaps scan the entire string for the word Box and if it exists create an input box popup for the user to view the address and ask him whether to include it or not, if his answer is yes, then add the record, else move next ... Instruct your users to not allow po boxes, and you can even include this in the popup ... and then if the user accidentally clicks yes on a po box, you can have some error control in your module. I hope this helps someone in the future.

If Left(MapRST!Address, 4) <> "PO B" Then 'Catches Bin or Box
Mapping comands here...
End If
MapRST.MoveNext

-Josh
__________________
---------------------------
-JPeters-
jpeters@guidemail.com
---------------------------
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 01-09-2003
Junior Member
Yellow Belt
 
Join Date: Jul 2002
Posts: 12
Send a message via ICQ to JPeters Send a message via AIM to JPeters
Might i add that you'll want to convert the entire address string to capital letters to avoid case sensitive problems.... I did in my solution, just forgot to type that code in. It's easy to do. And the reason why we search for BOX is to eliminate the error of P.O. versus PO.

Just some ideas, maybe it'll help someone somday..

-Josh
__________________
---------------------------
-JPeters-
jpeters@guidemail.com
---------------------------
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
automation, box, error, found, mappoint, vba


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
MapPoint Automation with C/C++ - Part 1 Eric Frost MP2K Magazine Articles 10 09-15-2006 11:01 AM
MapPoint Automation with C/C++ - Part 2 Eric Frost MP2K Magazine Articles 1 09-20-2005 11:00 AM
Addresses not found for MapPoint 'isMached'! pileggi MapPoint 2006/2009 Discussion 0 08-24-2005 11:09 AM
Automation -- Unable to kill mappoint.exe Anonymous MapPoint 2006/2009 Discussion 0 02-03-2004 11:12 PM
I am using Mappoint with Visual C++ via automation.... Anonymous MapPoint 2006/2009 Discussion 2 07-08-2002 02:07 AM


All times are GMT -5. The time now is 05:12 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
MP2K Magazine
Visitor Map


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55