In a mainform i have a combobox to let the user choose a compagnyname.
Based on this choice , a combobox situated on a subform has to display the articles that can be delivered from this compagny . The combobox on the main form has as dependent column, the LevID which is unique for each compagny. The rowsource of the combobox on the subform is a query into which we have as criterium for the field LevID: Forms!NameOfMainform!LevID .In Order to sync both comboboxes, in the afterupdate event of the combobox in the mainform the value of the combobox o the subform is first put to null and after that a requery is applied on this combobox.
All this seems to have as consequence that also the beforeUpdate of the subform get fired. This brings me into trouble because in this event i check the field Qty in the subform that may not be 0. On that moment i didn't got the time yet to enter a value in the field Qty, and therefore a runtime error occur
1) How does it come that the beforeupdate of the subform get fired?
2)If this is a normal fact, what to do check for a non zero value in the field QTY in the beforeUpdate event of the subform.
Based on this choice , a combobox situated on a subform has to display the articles that can be delivered from this compagny . The combobox on the main form has as dependent column, the LevID which is unique for each compagny. The rowsource of the combobox on the subform is a query into which we have as criterium for the field LevID: Forms!NameOfMainform!LevID .In Order to sync both comboboxes, in the afterupdate event of the combobox in the mainform the value of the combobox o the subform is first put to null and after that a requery is applied on this combobox.
All this seems to have as consequence that also the beforeUpdate of the subform get fired. This brings me into trouble because in this event i check the field Qty in the subform that may not be 0. On that moment i didn't got the time yet to enter a value in the field Qty, and therefore a runtime error occur
1) How does it come that the beforeupdate of the subform get fired?
2)If this is a normal fact, what to do check for a non zero value in the field QTY in the beforeUpdate event of the subform.