On my website (
www.rogersaccesslibrary.com), is a small Access database
sample called "CascadingComboInSubform.mdb" which illustrates how to do
this.
--
--Roger Carlson
MS Access MVP
Access Database Samples:
www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/...UBED1=ACCESS-L
"Stapes" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi
> I have a subform with the records displayed in the Continuous Forms
> view. On each line, I have a group & a subgroup. Both fields are Combo
> boxes. What I am trying to do is limit the choice of subgroups to
> those pertaining to the group shown.
> I have tried putting code in the On Current event in the form to allow
> only the correct subgroups in the Combo box, but it seems to take the
> criteria for the top record & apply it to all the others.
>
> This is the code:-
>
> Dim strSQL As String
> strSQL = "SELECT TLK_SubGroups.PK_SubGroup,
> TLK_SubGroups.TXT_SubAbriv, TLK_SubGroups.TXT_SubDet,
> TLK_SubGroups.FK_MainGroup " & _
> "FROM TLK_SubGroups " & _
> "WHERE (((TLK_SubGroups.FK_MainGroup)=" & PK_Group & "));"
>
> PK_SubGroup.RowSource = strSQL
> PK_SubGroup.Requery
>
> Any ideas how I can make it work?
>
> Stapes
>