To Mike D Sutton...need help..again
- From: vonclausowitz@xxxxxxxxx
- Date: 22 Jul 2006 10:54:46 -0700
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
.
- Follow-Ups:
- Re: To Mike D Sutton...need help..again
- From: Mike D Sutton
- Re: To Mike D Sutton...need help..again
- Next by Date: Re: Resizing PNG file in PictureBox/Image *with* transparency
- Next by thread: Re: To Mike D Sutton...need help..again
- Index(es):
Relevant Pages
|
Loading