B
Bill Murphy
I would like to populate a combo box on a form with all the queries in the
current database. I've defined cboQueries as a combo box on my form, and
set the Row Source Type as Value List. I've set the function GetQueries()
as the Row Source. When I compile the code I get "Method or Data Member Not
Found" in the second function for cboQueries.AddItem.
Any help would be appreciated.
Bill
____________________________________________________
Function GetQueries()
Dim accObject As Access.AccessObject
Dim x As Boolean
'Fill with queries
For Each accObject In CurrentData.AllQueries
x = AddItemToEnd(cboQueries, accObject.Name)
Next
End Function
Function AddItemToEnd(cboQueries As ComboBox, _
ByVal strItem As String)
cboQueries.AddItem Item:=strItem ' gets Method or Data Member Not
Found
End Function
current database. I've defined cboQueries as a combo box on my form, and
set the Row Source Type as Value List. I've set the function GetQueries()
as the Row Source. When I compile the code I get "Method or Data Member Not
Found" in the second function for cboQueries.AddItem.
Any help would be appreciated.
Bill
____________________________________________________
Function GetQueries()
Dim accObject As Access.AccessObject
Dim x As Boolean
'Fill with queries
For Each accObject In CurrentData.AllQueries
x = AddItemToEnd(cboQueries, accObject.Name)
Next
End Function
Function AddItemToEnd(cboQueries As ComboBox, _
ByVal strItem As String)
cboQueries.AddItem Item:=strItem ' gets Method or Data Member Not
Found
End Function