I created 2 Update queries as below and added it to a subform with command button using a wizard. The table was updating but the sub form was not refreshing. I read there is bug in Access on sub form Requery. I tried several methods as suggested in forums , some only are listed below
UPDATE tblCustRFQDtls LEFT JOIN tblCustRFQHdr ON tblCustRFQDtls.RFQHdrID = tblCustRFQHdr.RFQID SET tblCustRFQDtls.Flag = Yes
WHERE (((tblCustRFQHdr.ConsigneeCode)=[Forms]![FrmCustRFQHdr]![ConsigneeCode]));
UPDATE tblCustRFQDtls LEFT JOIN tblCustRFQHdr ON tblCustRFQDtls.RFQHdrID = tblCustRFQHdr.RFQID SET tblCustRFQDtls.Flag = No
WHERE (((tblCustRFQHdr.ConsigneeCode)=[Forms]![FrmCustRFQHdr]![ConsigneeCode]));
I then converted the macro to vba and added the below to both events of command buttons
Me.dirty = false
Me.recordset.requery
It did not work. I replaced Me.recordset.requery with me.refresh. Did not help
I tried Forms!frmCustRFQHdr.frmRFQDtls.Requery. Again not refreshing
The table is updating with the Update Queries. If I navigate to a new record, there is no issue
Please help!
UPDATE tblCustRFQDtls LEFT JOIN tblCustRFQHdr ON tblCustRFQDtls.RFQHdrID = tblCustRFQHdr.RFQID SET tblCustRFQDtls.Flag = Yes
WHERE (((tblCustRFQHdr.ConsigneeCode)=[Forms]![FrmCustRFQHdr]![ConsigneeCode]));
UPDATE tblCustRFQDtls LEFT JOIN tblCustRFQHdr ON tblCustRFQDtls.RFQHdrID = tblCustRFQHdr.RFQID SET tblCustRFQDtls.Flag = No
WHERE (((tblCustRFQHdr.ConsigneeCode)=[Forms]![FrmCustRFQHdr]![ConsigneeCode]));
I then converted the macro to vba and added the below to both events of command buttons
Me.dirty = false
Me.recordset.requery
It did not work. I replaced Me.recordset.requery with me.refresh. Did not help
I tried Forms!frmCustRFQHdr.frmRFQDtls.Requery. Again not refreshing
The table is updating with the Update Queries. If I navigate to a new record, there is no issue
Please help!