473,378 Members | 1,457 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Array Help needed

Guys ,

the below code is a VB project working woth mappoint. My probelm is
with the very last section of code not working ----'Set oShp =
objMap.Shapes.AddPolyline(objLoc2).

Im not sure i have setup the array objloc2 correclty???????

can anyone help?
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 objLoc2() 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
LoadMap()

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)
rstProps.MoveNext
Wend
------------------------------------------------------------------------------------------------------

While Not rstProps.EOF
i = i + 1
Set objLoc2(i) = objMap.FindAddressResults(rstProps!strStreet,
rstProps!strCity, rstProps!strState, rstProps!strPostalCode)(1)
rstProps.MoveNext
Wend

Dim oShp As MapPoint.Shape
Set oShp = objMap.Shapes.AddPolyline(objLoc2)

Dec 14 '06 #1
0 788

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Treetop | last post by:
I cannot get this array to work. I want to have the game listed until the day after the event, then come off the list. function events() { var today = new Date(); var dayarray=new...
7
by: Bangalore | last post by:
Hi all, Plz clarify me, on the implementation of two or three dimensional array using overloaded operator. Thanks, in advance Bangalore
29
by: shmartonak | last post by:
For maximum portability what should the type of an array index be? Can any integer type be used safely? Or should I only use an unsigned type? Or what? If I'm using pointers to access array...
8
by: intrepid_dw | last post by:
Hello, all. I've created a C# dll that contains, among other things, two functions dealing with byte arrays. The first is a function that returns a byte array, and the other is intended to...
21
by: yeti349 | last post by:
Hi, I'm using the following code to retrieve data from an xml file and populate a javascript array. The data is then displayed in html table form. I would like to then be able to sort by each...
7
by: heddy | last post by:
I have an array of objects. When I use Array.Resize<T>(ref Object,int Newsize); and the newsize is smaller then what the array was previously, are the resources allocated to the objects that are...
45
by: VK | last post by:
(see the post by ASM in the original thread; can be seen at <http://groups.google.com/group/comp.lang.javascript/browse_frm/thread/3716384d8bfa1b0b> as an option) As that is not in relevance to...
36
by: pereges | last post by:
Hi, I am wondering which of the two data structures (link list or array) would be better in my situation. I have to create a list of rays for my ray tracing program. the data structure of ray...
33
by: Adam Chapman | last post by:
Hi, Im trying to migrate from programming in Matlab over to C. Im trying to make a simple function to multiply one matrix by the other. I've realised that C can't determine the size of a 2d...
6
by: The Natural Philosopher | last post by:
I am trying to create what amounts to an array of 'structures'. I.e. I want to dynamically add to and access an object as myobject.anothernumber // actually represents a nesting level. and ...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.