So I have this form "frmProjectHistory" with a subform "frmMaterialsUseSubform". There is a combobox on the subform called "cmbMaterialsUsed" with a row source: SELECT [tblMaterials].[ID], tblMaterials.[Material] FROM tblMaterials;
On this same subform there is a button that opens a continuous form (frmMaterials) that adds data to the table "tblMaterials". I use this button to add a material to that table with the aim to be able to select that material in the combobox "cmbMaterialsUsed".
Unfortunately, after I add a record in the table "tblmaterials" though the continuous form "frmMaterials" and I close "frmMaterials", the new material does not appear in "cmbMaterialsUsed" until I close the database and restart it. This means that I need to add some Refresh? Requery? code somewhere after adding the material and closing "frmMaterials", but for the life of me I have not figured it out yet.
I have tried Forms!frmPropertyHistory![frmMaterialsUseSubform].Form.Requery when closing frmMaterials
I have tried Me.requery when clicking on cmbMaterialsUsed
I have tried Me.requery when unlocking frmMaterialsUseSubform
Any suggestions?
mafhobb
On this same subform there is a button that opens a continuous form (frmMaterials) that adds data to the table "tblMaterials". I use this button to add a material to that table with the aim to be able to select that material in the combobox "cmbMaterialsUsed".
Unfortunately, after I add a record in the table "tblmaterials" though the continuous form "frmMaterials" and I close "frmMaterials", the new material does not appear in "cmbMaterialsUsed" until I close the database and restart it. This means that I need to add some Refresh? Requery? code somewhere after adding the material and closing "frmMaterials", but for the life of me I have not figured it out yet.
I have tried Forms!frmPropertyHistory![frmMaterialsUseSubform].Form.Requery when closing frmMaterials
I have tried Me.requery when clicking on cmbMaterialsUsed
I have tried Me.requery when unlocking frmMaterialsUseSubform
Any suggestions?
mafhobb