combo box sort order

G

Guest

Hello All,

Anyone know how to sort a cascading combo box. The second combo box does
not have a control source so I am unsure how to sort the data in the combo
box.

Here is the code on the first combo box:

Dim strSQL As String

strSQL = "Select numSecondaryOccurrenceID, strOccurrenceSecondaryType
from tblSecondaryOccurrenceFileKey " & _
"WHERE numPrimaryOccurrenceID = " & Me.lboPrimOccToInclude
Me!lboSecOccToInclude.RowSourceType = "Table/Query"
Me!lboSecOccToInclude.RowSource = strSQL

Any help would be appreciated!

Regards,
George
 
D

Douglas J. Steele

Dim strSQL As String

strSQL = "Select numSecondaryOccurrenceID, strOccurrenceSecondaryType
from tblSecondaryOccurrenceFileKey " & _
"WHERE numPrimaryOccurrenceID = " & Me.lboPrimOccToInclude & _
" ORDER BY strOccurrenceSecondaryType"
Me!lboSecOccToInclude.RowSourceType = "Table/Query"
Me!lboSecOccToInclude.RowSource = strSQL
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top