A
Al
I have a form (frmProdLineMaint) with a combo box (cmbProdLineID) which is
tied to a subform on the form (this works) and a command button that edits
the underlying table (tblProdLine) which is also the rowsource for the combo
box. The rowsource SQL looks like this and it works:
SELECT DISTINCTROW tblProductLine.idsProdLineID,
tblProductLine.chrProdLineName, tblProductLine.lngProdID FROM tblProductLine
WHERE (((tblProductLine.lngProdID)=Forms!frmProdLineMaint!cmbProdID)) ORDER
BY tblProductLine.lngProdID, tblProductLine.intSortSequence;
My problem is requerying the rowsource of cmbProdLineID when there has been
an edit/addition to tblProdLine File and having it display after the update
form is closed. The new entry (or edit) does not show in the combo box after
the edit.
My vba to open the update form and requery looks like this:
Private Sub cmdProdLine_Click()
DoCmd.OpenForm "frmProductLine"
Me.cmbProdLineID.SetFocus
Me.cmbProdLineID.Requery
end sub
What am I missing?
tied to a subform on the form (this works) and a command button that edits
the underlying table (tblProdLine) which is also the rowsource for the combo
box. The rowsource SQL looks like this and it works:
SELECT DISTINCTROW tblProductLine.idsProdLineID,
tblProductLine.chrProdLineName, tblProductLine.lngProdID FROM tblProductLine
WHERE (((tblProductLine.lngProdID)=Forms!frmProdLineMaint!cmbProdID)) ORDER
BY tblProductLine.lngProdID, tblProductLine.intSortSequence;
My problem is requerying the rowsource of cmbProdLineID when there has been
an edit/addition to tblProdLine File and having it display after the update
form is closed. The new entry (or edit) does not show in the combo box after
the edit.
My vba to open the update form and requery looks like this:
Private Sub cmdProdLine_Click()
DoCmd.OpenForm "frmProductLine"
Me.cmbProdLineID.SetFocus
Me.cmbProdLineID.Requery
end sub
What am I missing?