Here is the situation, I use the following code to set the RowSource of a combo box:
PartQuery = "SELECT [Parts].[PartID], [Parts].[Part] FROM Parts WHERE [Parts].[PartID]= 1 Or [Parts].[SubCatID]=" & Me!cmbSubCategory & " ORDER BY [Parts].[Part];"
Me!cmbPart.RowSource = PartQuery
This work fine, but there are no item selected in the combo box. I would like to select (as a default) the first item of the list. How can I do that??
Thanks for your help in advance.
PartQuery = "SELECT [Parts].[PartID], [Parts].[Part] FROM Parts WHERE [Parts].[PartID]= 1 Or [Parts].[SubCatID]=" & Me!cmbSubCategory & " ORDER BY [Parts].[Part];"
Me!cmbPart.RowSource = PartQuery
This work fine, but there are no item selected in the combo box. I would like to select (as a default) the first item of the list. How can I do that??
Thanks for your help in advance.