Re: Mike D Sutton please need help....
- From: vonclausowitz@xxxxxxxxx
- Date: 29 Jun 2006 11:10:39 -0700
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
Mike D Sutton schreef:
great stuff but how do I combine my Form_Paint with your code?<code snipped>
My code was simply how to find evenly spaced points round a central point, the idea was that you move each of your
'boxes' to these points and use your existing drawing code as-is. The lines/'ropes' use the objects as their end points
and as such draw correctly regardless of where they're put.
Hope this helps,
Mike
- Microsoft Visual Basic MVP -
E-Mail: EDais@xxxxxxxx
WWW: Http://EDais.mvps.org/
.
- References:
- Mike D Sutton please need help....
- From: vonclausowitz
- Re: Mike D Sutton please need help....
- From: Mike D Sutton
- Re: Mike D Sutton please need help....
- From: vonclausowitz
- Re: Mike D Sutton please need help....
- From: Mike D Sutton
- Re: Mike D Sutton please need help....
- From: vonclausowitz
- Re: Mike D Sutton please need help....
- From: Mike D Sutton
- Re: Mike D Sutton please need help....
- From: vonclausowitz
- Re: Mike D Sutton please need help....
- From: Mike D Sutton
- Re: Mike D Sutton please need help....
- From: vonclausowitz
- Re: Mike D Sutton please need help....
- From: Mike D Sutton
- Re: Mike D Sutton please need help....
- From: vonclausowitz
- Re: Mike D Sutton please need help....
- From: Mike D Sutton
- Mike D Sutton please need help....
- Prev by Date: Re: Mike D Sutton please need help....
- Next by Date: Re: A few testers needed
- Previous by thread: Re: Mike D Sutton please need help....
- Next by thread: Re: Mike D Sutton please need help....
- Index(es):
Relevant Pages
|