Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filling a combo box with code 1

Status
Not open for further replies.

Syerston

Programmer
Jun 2, 2001
142
GB
If you are creating a list for a combo box in VBA what should the syntax be.
Code:
If PassId = "99" Then
   cboSelect_RAD.Value = "301"
End If

This works for one value, but how then do you give it a list.



John
 
You have to set the RowSource property of the combo box and add semi-colons between values. Also make sure that the RowSourceType of the combo box is set to value list. i.e.

If PassId = "99" Then
cboSelect_RAD.RowSource = "301;302;303;304"
End If
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top