I know the video I mentioned earlier isn't the greatest, but I couldn't find another when I looked.
If you watch the video, I think you will see the kind of code involved.
I used the code below to display a set of terms in a combobox.
To determine what should be displayed, the user selected an OptionButton in a Frame. The value associated with the Option chosen, matched a language identifier.
Code:
Private Sub Frame2_AfterUpdate()
Dim SQL As String
Debug.Print "value of me.frame2 after update is " & Me.Frame2
SQL = "select * from (SELECT EntryEF.id, EntryEF.entry, EntryEF.langCode " _
& "FROM EntryEF Union select 0,'<Please Select>',1 from entryEF " _
& " Union select 0,'<Choississez>',2 from entryEF " _
& " UNION select 0,'<OndellexChermigo>',3 from entryEF) where langCode = " _
& Forms!frmEntriesByLang.Frame2 & " ORDER BY id;"
Debug.Print SQL
Me.Combo0.Value = ""
Me.Combo0.RowSourceType = "Table/Query"
Me.Combo0.RowSource = SQL
Me.Combo0.Requery
End Sub
The form, the option group and the table are shown in the attached jpg.
After posting edit: I have tried to delete the jpgs, except for the one showing the combo contents, but haven't figured out how to delete.