S
Steve
I have an unbound combobox in the form header of a continuous form. The
selection in the combobox sets the where clause in a querydef which determines
QryPFrmInventoryManagement. The following code is in the afterupdate event of
the combobox:
Me.RecordSource = "QryPFrmInventoryManagement"
Me!ItemCount = Me.RecordsetClone.RecordCount & " Items"
MsgBox Me.RecordsetClone.RecordCount & " Items"
Everything works fine as long as the query returns one or more records. When the
query does not return any records, the selection disappears in the combobox.
Also, the textbox, ItemCount, does not change from its previous value although
the MsgBox returns 0. Can anyone explain the odd behavior of the combobox and
textbox when the query does not return any records?
Thanks for all help!
Steve
selection in the combobox sets the where clause in a querydef which determines
QryPFrmInventoryManagement. The following code is in the afterupdate event of
the combobox:
Me.RecordSource = "QryPFrmInventoryManagement"
Me!ItemCount = Me.RecordsetClone.RecordCount & " Items"
MsgBox Me.RecordsetClone.RecordCount & " Items"
Everything works fine as long as the query returns one or more records. When the
query does not return any records, the selection disappears in the combobox.
Also, the textbox, ItemCount, does not change from its previous value although
the MsgBox returns 0. Can anyone explain the odd behavior of the combobox and
textbox when the query does not return any records?
Thanks for all help!
Steve