Cameron.Turner
New member
- Local time
- Today, 16:30
- Joined
- Oct 6, 2009
- Messages
- 5
Hi All,
Not sure there is a solution to this one, but I thought I'd ask anyway
I have a main form with a subform embedded. The parent/child links are all working perfectly. The data inserted into the subform is dependent on selection from a combo box on the main form. This also works perfectly.
One of the fields in the subform is also a combo box, but this one is dependent on selection of a another combo box within the subform. This also works.
However, when I navigate to a field on the main form, the entries in the subform combo box disappear. All entries in the subform except the last one disappear on lost focus. They are still there, saved to the table, but they are no longer showing.
It is only the data in the subform combo box that disappears. All the other data in the subform remains visible as you navigate back and forth between the main form and subform. So I am pretty sure the problem lies with the code I am using to create the combo box:
When you enter the combo box field, I call the above code to limit the drop down options to where the criteria matches the current criteria.
Is there anything I can do to stop the data disappearing from the combo box when I navigate to the main form?
Not sure there is a solution to this one, but I thought I'd ask anyway

I have a main form with a subform embedded. The parent/child links are all working perfectly. The data inserted into the subform is dependent on selection from a combo box on the main form. This also works perfectly.
One of the fields in the subform is also a combo box, but this one is dependent on selection of a another combo box within the subform. This also works.
However, when I navigate to a field on the main form, the entries in the subform combo box disappear. All entries in the subform except the last one disappear on lost focus. They are still there, saved to the table, but they are no longer showing.
It is only the data in the subform combo box that disappears. All the other data in the subform remains visible as you navigate back and forth between the main form and subform. So I am pretty sure the problem lies with the code I am using to create the combo box:
Code:
Private Sub ReasonID_Enter()
Dim sReasonSource As String
sReasonSource = "SELECT [tblQAReason].[ReasonID], [tblQAReason].[Reason] " & _
"FROM tblQAReason " & _
"WHERE [CriteriaID] = " & Me.CriteriaID.Value
Me.ReasonID.RowSource = sReasonSource
End Sub
When you enter the combo box field, I call the above code to limit the drop down options to where the criteria matches the current criteria.
Is there anything I can do to stop the data disappearing from the combo box when I navigate to the main form?