populated list boxes

mikevds

Music Library
Local time
Today, 14:40
Joined
Apr 29, 2005
Messages
69
First of all, Thanks very much
QdogFball for the Hymnal Zip
However I missed one thing, on the previous post I explained.

the FormHymnal Form

Hymnal has Record 1 through 7 name of Hymnal

Subform has tblesonginfosubform

Name of Song
Hymnal Name
Composer Name

I need a listbox linked to a subform how do I go about this.

So when I click on the NameofHymnal List box.
It populates back on the subform or second list box, and ONLY displays the songs from the subform that are in those Hymnals.

I hope you can follow me through.

Thanks,

Mike Van Der Stad
mikevds@optonline.net
 
In the AfterUpdate event of the Listbox, you could add code to reset the sub form's record source e.g.
Code:
Dim str_Data as String

str_Data = "SELECT [I]song name, hymnal, composer[/I]  FROM [I]tablename[/I] WHERE [Hymnal' = '" & [Forms]![FormHymnal]![NameOfHymnal]& "'"
[Forms]![FormHymnal]![[I]name of subform[/I]].Form.RecordSource = str_Data
[Forms]![FormHymnal]![[I]name of subform[/I]].Form.Requery
 

Users who are viewing this thread

Back
Top Bottom