View Full Version : Form and combo box


Yoshi88
04-30-2001, 11:17 AM
Someone gave this code to speed up my form. It is suppose to load the list of the combo box only when required

Dim strSQL as String
strSQL = "SELECT DISTINCT [TableName].[FieldName] FROM [TableName] ORDER BY [TableName].[FieldName];"
Me.cboComboBoxName.RowSource = strSQL

It doesn't work and the debugger insist on the last line Me.cbo...

Can someone help me

Jack Cowley
04-30-2001, 07:32 PM
If you are trying to use the code exactly as it is here then you need to make some changes. Where the code says TableName put in the name of your Table that you want to get the information from. Where it says FieldName put in the name of the field in your Table that you want displayed in the Combo box. And where it say cboComboBoxName put in the name of your Combo box....