I have added code on one of my forms to use a different query for the RowSource based on the value of another field. There are three different queries and I know the combo box is picking up the correct query because I can see the different data.
However, all three queries are returning 217 rows (which seems like an unusual number).
Here is the code:
Private Sub cbDomainSelection_Enter()
Select Case Forms!f00MenuMain![optionSource]
Case 1
Forms!f02DomainSelection.cbDomainSelection.RowSour ce = "qr03DomainSelectionPROD"
Case 2
Forms!f02DomainSelection.cbDomainSelection.RowSour ce = "qr03DomainSelectionAUTO"
Case 3
Forms!f02DomainSelection.cbDomainSelection.RowSour ce = "qr03DomainSelectionPROP"
Case Else
Me!txbSource = "SOURCE ERROR!"
End Select
End Sub
If I run the queries on their own, all of the rows are returned as expected. The SQL is VERY simple, as shown in this example:
SELECT tDomainPRODUCTION.DomainID
FROM tDomainPRODUCTION;
I don't see any property for the combo box that would affect the number of rows returned.
However, all three queries are returning 217 rows (which seems like an unusual number).
Here is the code:
Private Sub cbDomainSelection_Enter()
Select Case Forms!f00MenuMain![optionSource]
Case 1
Forms!f02DomainSelection.cbDomainSelection.RowSour ce = "qr03DomainSelectionPROD"
Case 2
Forms!f02DomainSelection.cbDomainSelection.RowSour ce = "qr03DomainSelectionAUTO"
Case 3
Forms!f02DomainSelection.cbDomainSelection.RowSour ce = "qr03DomainSelectionPROP"
Case Else
Me!txbSource = "SOURCE ERROR!"
End Select
End Sub
If I run the queries on their own, all of the rows are returned as expected. The SQL is VERY simple, as shown in this example:
SELECT tDomainPRODUCTION.DomainID
FROM tDomainPRODUCTION;
I don't see any property for the combo box that would affect the number of rows returned.