Coding using ADO control
Coding using ADO control
(OP)
I am currently using an ADO control with visual basic.
This piece of code is *supposed* to display the fields of ClickChoice (what i clicked in the list box) in another list box. However it seems I can't use the variable ClickChoice when trying to connect the DB (AdoFilterSearch.Recordset!ClickChoice) - since it wants the exact field name instead of ClickChoice (for example Title).
Any ideas on how I can put the variable in this piece of code?
Dim ClickChoice
ClickChoice = AdoFilterSearch.Recordset.Fields(Index).Name
AdoFilterSearch.Recordset.MoveFirst
Do Until AdoFilterSearch.Recordset.EOF
'CboFilterBox(2).AddItem (AdoFilterSearch.Recordset!
ClickChoice)
This piece of code is *supposed* to display the fields of ClickChoice (what i clicked in the list box) in another list box. However it seems I can't use the variable ClickChoice when trying to connect the DB (AdoFilterSearch.Recordset!ClickChoice) - since it wants the exact field name instead of ClickChoice (for example Title).
Any ideas on how I can put the variable in this piece of code?
Dim ClickChoice
ClickChoice = AdoFilterSearch.Recordset.Fields(Index).Name
AdoFilterSearch.Recordset.MoveFirst
Do Until AdoFilterSearch.Recordset.EOF
'CboFilterBox(2).AddItem (AdoFilterSearch.Recordset!
ClickChoice)
RE: Coding using ADO control
AdoFilterSearch.Recordset!ClickChoice will not work
Use AdoFilterSearch.Recordset(ClickChoice)
RE: Coding using ADO control
Again, thanks for your help, i now have a very nice filter search working!