G
Gitche Gumee
I am using the NotInList event of a combobox on a form (frmOrderDetails) to
open another form (frmProducts) for entry of the new item in the Products
table. OpenArgs is used to pass NewData and populate the appropriate field
(ProductID) in the Products form. That works fine.
What I would like to do is then take the ProductID back to the OrderDetails
form, requery the ProductID combobox, and populate other fields on the
OrderDetails form (ProductDescription and UnitPrice) without retyping the new
ProductID. That's working fine too.
The problem is that requerying the combobox and populating the other fields
is overriding whatever it is that triggers the Access response to entering
data in a new record. That is, when an item in the list is selected in
cboProductID, a new row is generated below the current record. This is normal
behavior. But when the item is not in the list and I add it as described
above, a new row does not appear. Tabbing through all the fields in the
current record ends up taking me to the next order, not the next (new)
OrderDetails record. Returning to the order I was working on makes the "new"
row appear so that's the workaround for now.
Additional info: frmOrderDetails is a subform displayed in Datasheet view.
I know you will probably need my code; I'll post it when I'm back at home.
But I wanted to get this posted and see if anyone has seen this behavior.
Thanks.
open another form (frmProducts) for entry of the new item in the Products
table. OpenArgs is used to pass NewData and populate the appropriate field
(ProductID) in the Products form. That works fine.
What I would like to do is then take the ProductID back to the OrderDetails
form, requery the ProductID combobox, and populate other fields on the
OrderDetails form (ProductDescription and UnitPrice) without retyping the new
ProductID. That's working fine too.
The problem is that requerying the combobox and populating the other fields
is overriding whatever it is that triggers the Access response to entering
data in a new record. That is, when an item in the list is selected in
cboProductID, a new row is generated below the current record. This is normal
behavior. But when the item is not in the list and I add it as described
above, a new row does not appear. Tabbing through all the fields in the
current record ends up taking me to the next order, not the next (new)
OrderDetails record. Returning to the order I was working on makes the "new"
row appear so that's the workaround for now.
Additional info: frmOrderDetails is a subform displayed in Datasheet view.
I know you will probably need my code; I'll post it when I'm back at home.
But I wanted to get this posted and see if anyone has seen this behavior.
Thanks.