Adding items in access combo box progrmmatically

  • Thread starter Thread starter Jack
  • Start date Start date
J

Jack

Hi,
I am trying to add items to a Access combo box programatically as follows:

' Load the drop down
With cbTechnique
.AddItem "Orders by Customer (refresh method)"
.AddItem "Orders by Customer (CreateParameter method)"
.AddItem "Add an order detail item"
.AddItem "Get Revenue by week"
.AddItem "Add an order"
End With

But this seems to be not working. Any help is appreciated. Thanks in advance.
 
Jack,

Generally, I shy away from building combo and list box lists
programmatically. It is much simpler to maintain if you build these lists in
tables and reference the table or a query based on a table as the rowsource
for the combo.

HTH
Dale
 
"seems to be not working"
is a bit vague.
What is not working?
Are you getting an error, if so, what error and on what line of code?
Where is this code?
How do you know it is actually executing?
What version of Access are you running?

Without the detail above, all I can answer is
"You're not doing it correctly"
 
Thanks to everyone who has given great advise. Actually I am using Access
2000 version. With this I believe I cannot do coding that I have done. I took
your advise and it works now. Regards.
 
Back
Top