Hey guys...
I was reluctant to post this on Tek-Tips just yet due to the fact that a simple string method is stumping me. Since I've self-taught myself VBA, I skipped a lot of the basics.
Anyways, I've got a quesiton. I'm working on a MapPoint database again and I'm gettin a small error. I don't know VB as well as I know Java these days and there error is a bit beyond me, but I'm positive that there has to be an extremely easy fix.
Basically the map point automation module that I wrote scrolls through a recordset consisting of address (street), city, state, and zip, oh - and the name of the pushpin location. It then places a pushpin at the correct spot and cycles through to the next record ... looping until the recordset is eof ... err empty .. I still dont know what eof stands for ... end of file? ... Anywho ... I'm having a small problem when the street address is a PO box... it gives me an error and the program halts. IS there a way I can do something like we do in java with the substring() method?
Ie: this is the record name for the street portion of the full address.... and does != work in place of <> in vb for does not equal?
If MapRST!Adress.substring(0, 5) <> "PO BOX" then
....commands to map
end if
This will help ... but im a bit concerned about the stuff in the quotes being case sensitive if it does work. Got any ideas?
Thanks for your time.
-Josh ------------------
-JPeters
Got a helpful tip for Access Users? Check out and contribute to 'How to Keep Your Databases from becoming Overwhelming!'
thread181-293590
jpeters@guidemail.com
------------------
I was reluctant to post this on Tek-Tips just yet due to the fact that a simple string method is stumping me. Since I've self-taught myself VBA, I skipped a lot of the basics.
Anyways, I've got a quesiton. I'm working on a MapPoint database again and I'm gettin a small error. I don't know VB as well as I know Java these days and there error is a bit beyond me, but I'm positive that there has to be an extremely easy fix.
Basically the map point automation module that I wrote scrolls through a recordset consisting of address (street), city, state, and zip, oh - and the name of the pushpin location. It then places a pushpin at the correct spot and cycles through to the next record ... looping until the recordset is eof ... err empty .. I still dont know what eof stands for ... end of file? ... Anywho ... I'm having a small problem when the street address is a PO box... it gives me an error and the program halts. IS there a way I can do something like we do in java with the substring() method?
Ie: this is the record name for the street portion of the full address.... and does != work in place of <> in vb for does not equal?
If MapRST!Adress.substring(0, 5) <> "PO BOX" then
....commands to map
end if
This will help ... but im a bit concerned about the stuff in the quotes being case sensitive if it does work. Got any ideas?
Thanks for your time.
-Josh ------------------
-JPeters
Got a helpful tip for Access Users? Check out and contribute to 'How to Keep Your Databases from becoming Overwhelming!'
thread181-293590
jpeters@guidemail.com
------------------