G
Gert
I store the contents of my comboboxes in seperate tables and initialise them
while loading the relevant form. To do so I call the sub below for every
combobox on the form. This works well for normal forms, however subforms are
not found (for unclear reasons).
I use the following call to do this:
Call InitKeuzelijst("ListName", "Name combobox", "form name")
Can someone point me in the right direction?
Thanks
Sub InitKeuzelijst(NaamLijst As String, veldnaam As String, FormNaam As
String)
Dim Sqlq As String
Sqlq = "SELECT TblKLElement.Omschrijving, TblKLElement.ElementID FROM
tblKeuzelijst "
Sqlq = Sqlq & "INNER JOIN TblKLElement ON TblKeuzelijst.KeuzelijstID =
TblKLElement.KeuzelijstID "
Sqlq = Sqlq & "WHERE (((TblKeuzelijst.Omschrijving)= " & Chr(34) &
NaamLijst & Chr(34) & "));"
Forms(FormNaam).Controls(veldnaam).RowSource = Sqlq
End Sub
Call InitKeuzelijst("Inventaris beschikbaar", "Keuzelijst met invoervak28",
"frmMaksin")
while loading the relevant form. To do so I call the sub below for every
combobox on the form. This works well for normal forms, however subforms are
not found (for unclear reasons).
I use the following call to do this:
Call InitKeuzelijst("ListName", "Name combobox", "form name")
Can someone point me in the right direction?
Thanks
Sub InitKeuzelijst(NaamLijst As String, veldnaam As String, FormNaam As
String)
Dim Sqlq As String
Sqlq = "SELECT TblKLElement.Omschrijving, TblKLElement.ElementID FROM
tblKeuzelijst "
Sqlq = Sqlq & "INNER JOIN TblKLElement ON TblKeuzelijst.KeuzelijstID =
TblKLElement.KeuzelijstID "
Sqlq = Sqlq & "WHERE (((TblKeuzelijst.Omschrijving)= " & Chr(34) &
NaamLijst & Chr(34) & "));"
Forms(FormNaam).Controls(veldnaam).RowSource = Sqlq
End Sub
Call InitKeuzelijst("Inventaris beschikbaar", "Keuzelijst met invoervak28",
"frmMaksin")