Can Combobox value list be altered at run time?

P_Henry

Registered User.
Local time
Today, 19:06
Joined
Dec 3, 2003
Messages
63
Is it possible to alter the values displayed in a combo-box dropdown at run time. I tried using the following bit of code in a listbox's 'After Update' event , but it does not alter the combo-box's value list.

dim strSponProjStatus as string
dim StrNonSponProjStatus as string

strSponProjStatus = "Seed ; Growth; Consolidation; Phase Out; Closed"
StrNonSponProjStatus = "Under Nego;Funded;Part Funded;Suspended;Unfunded"


Me.cboProjectStatus.RowSourceType = "valuelist"

If Me.cboFundingSource = "Sponsorship-ADP" Then
Me.cboProjectStatus.RowSource = strSponProjStatus
Else
Me.cboProjectStatus.RowSource = StrNonSponProjStatus
End If




Any suggestions as to why this is not working?

Cheers :eek:
 
Change...

Code:
Me.cboProjectStatus.RowSourceType = "valuelist"

to

Code:
Me.cboProjectStatus.RowSourceType = "Value List"

A Me.ComboBoxName.Requery line may also be necessary...

Regards,
Tim
 
G'Day Tim,

Thanks...It works perfectly well.
 

Users who are viewing this thread

Back
Top Bottom