Fill a combobox from VBA

spikepl

Eledittingent Beliped
Local time
Tomorrow, 00:20
Joined
Nov 3, 2010
Messages
6,142
I have a combobox which in principle is filled from a query, but I need to add 3 further options. The combo sits in records shown in a datasheet view, and should behave like a normal combo with a row source type table/query (ie. update on a requery etc)

For filling a listbox I have found this: http://etutorials.org/Microsoft+Pro...ammatically+Add+Items+to+a+List+or+Combo+Box/

and my guess is that for a combobox I just need to swap the LB to CB in the various constant names.

If anyone has a working sample for a combo - or a link - I'd really appreciate it. Or a better idea, to produce the desired combo :) Maybe tie it to a union query with my options first, followed by the original query?
 
Ok I use a union query as record source, and it does what I need, so I escape more fancy coding:)
 

Users who are viewing this thread

Back
Top Bottom