To Mike D Sutton...need help..again



Mike this is a repost from an earlier email I think you didn't see.

http://groups.google.nl/group/microsoft.public.vb.winapi.graphics/browse_frm/thread/c611c486c7473ae3/22c57eb42d3f3ffd?lnk=st&q=&rnum=2&hl=nl#22c57eb42d3f3ffd


Now that I have the graphical part arranged (thanks to Mike) I need to
load some stuff
on my page from a recordset.
I have been trying to get things in a function but I can't seem to get
my fingers behind it.
It is rather complex with six entities and so many linked tables.

What I'm trying to do is the following.
I want to display a record from an entity (can by a Person, Event,
Vehicle and so on...)
The entity is related to other entities. For example a Person is
related to several Events and a Vehicle.

So I need to load the Person on the page with:

Private Sub Form_Load()

Dim theName As String
Dim B As Box

Set rs = dbfASIC.OpenRecordset(SearchStr, dbOpenDynaset)
theName = rs.Fields("BID")

Font.Size = 24
Boxes.Add NewBox(Me.ImageList1.ListImages(1).Picture, _
LinkAnalysis.ScaleWidth \ 2, LinkAnalysis.ScaleHeight \ 2, _
UCase(rs.Fields("family_name")) & ", " & rs.Fields("first_name"))

End Sub

And then with the id-field (BID) I need to get all the records that the
person is linked to:
for example to other people:

strBio = "SELECT Biographies.BID, Biographies.family_name,
Biographies.first_name " & _
"FROM Biographies AS Biographies_1 INNER JOIN (Biographies
INNER JOIN " & _
"BiographiesPerBiographies " & _
"ON Biographies.BID = BiographiesPerBiographies.BID) " & _
"ON Biographies_1.BID = BiographiesPerBiographies.Bio " & _
"WHERE Biographies_1.BID = " & sID & " ORDER BY
Biographies.family_name"

CircPts = GetCirclePoints(rs2.RecordCount, CircleHeight, Me.ScaleWidth
\ 2, Me.ScaleHeight \ 2)

rs2.MoveFirst
Do While rs2.EOF = False
For LoopPts = 0 To rs2.RecordCount - 1
With CircPts(LoopPts)
Font.Size = 24
Boxes.Add NewBox(Me.ImageList1.ListImages(1).Picture, .x, .y,
rs2.Fields("family_name") & ", " & rs2.Fields("first_name"))
Font.Size = 8
Ropes.Add NewRope(Boxes(1), Boxes(LoopPts + 2), " commander "
& LoopPts + 2, vbBlack)
End With
rs2.MoveNext
Next LoopPts
Loop

The related links will be shown with a Box and a Rope connecting them
with the entity.
So I have to do the above for all the other related entities.
The problem is that I first need the total of related records so I can
define the:
CircPts, otherwise I can do the math thing to make a need circle.

Sounds complicated, and it is I think.

Marco

.



Relevant Pages

  • Re: Need help with SQL statement for JOIN-type stuff
    ... > Assume user = Mike ... How will I know if I have the query correct? ... FROM MiniHaveWant AS mh INNER JOIN AS u ON mh.userId = u.id ... FROM MiniStatData ms INNER JOIN Stat s ON ms.statId = s.id ...
    (microsoft.public.inetserver.asp.db)
  • Re: Mike D Sutton please need help....
    ... Now that I have the graphical part arranged (thanks to Mike) I need to ... So I need to load the Person on the page with: ... CircPts = GetCirclePoints(rs2.RecordCount, CircleHeight, Me.ScaleWidth ... 'boxes' to these points and use your existing drawing code as-is. ...
    (microsoft.public.vb.winapi.graphics)
  • Re: how to match time ranges for multiple records in a query?
    ... >> mike wrote: ... >>> FROM TimeblocksPerPerson AS t INNER JOIN ... >>> MultiReservedTimeblocks AS m ...
    (microsoft.public.inetserver.asp.db)
  • Re: "Optimize for N rows" command
    ... If you have no tie values, you can change the LEFT join for an inner join, ... Vanderghast, Access MVP ...
    (microsoft.public.access.queries)
  • Re: Using subquery with Like
    ... Hi Mike, ... INNER JOIN Category ... Best, Hugo ... (Remove _NO_ and _SPAM_ to get my e-mail address) ...
    (microsoft.public.sqlserver.programming)

Loading