
selecting records for 2nd combo box dependant on first combo box
On Thu, 18 Feb 1999 09:11:31 -0500, "Brian J. McNamara"
Quote:
>I'm using VB 6.0. I have a form with 2 combo boxes, both get there"fill"
>from two different MS Access table's. I only want to load some of the
>records in the second combo box, depending on what was selected at run
>time in the first combo box. Do I need two forms to do this or is there
>any easier way? I am very new at VB. Thanks for your time.
>Brian
This should give you an idea of where to start...if you need more mail
me as I have code specifically for this, but will have to dig it
out....
To use the "SelectedItem" property of the dbCombo the following code
is placed in the click event of dbcName.
Data1.Recordset.Bookmark = dbcName.SelectedItem 'move to the
selected
record in data control
strPlayerID = Data1.Recordset("PlayerID")
Dim pqdPersonal As QueryDef
Set pqdPersonal = dbData.QueryDefs("qryPFill") 'This is a
stored
Parameter query
pqdPersonal("varPlayerID") = strPlayerID
Set rsPersonal = pqdPersonal.OpenRecordset()
HTH,
Ed Phillippe
****************************************
NOTICE TO BULK EMAILER(S):
Pursuant to US Code, Title 47, Chapter
5, Subchapter II, 227, any & all
unsolicited commercial e-mail sent to
this address is subject to a download
and archival fee in the amount of
$500 US and copies will be forwarded
to domain administrators--E-mailing
denotes acceptance of said terms!
BUT, just in case you do SPAM this:
****************************************