Share via

Access I update a field on a table and save it. However, the newly updated field does not shown in the query

Anonymous
2024-05-29T08:40:49+00:00

I use the follow query in a form:
SELECT DISTINCT tblMemberInfo.Grade_8_Exam_Date, tblMemberInfo.Grade_7_Exam_Date, tblMemberInfo.Grade_6_Exam_Date, tblMemberInfo.Grade_4_Exam_Date, tblMemberInfo.Grade_3_Exam_Date, tblMemberInfo.Grade_2_Exam_Date, tblMemberInfo.Grade_1_Exam_Date, tblMemberInfo.Grade_5_Exam_Date

FROM tblMemberInfo

ORDER BY tblMemberInfo.Grade_8_Exam_Date DESC , tblMemberInfo.Grade_7_Exam_Date DESC , tblMemberInfo.Grade_6_Exam_Date DESC , tblMemberInfo.Grade_5_Exam_Date DESC , tblMemberInfo.Grade_4_Exam_Date DESC , tblMemberInfo.Grade_3_Exam_Date DESC , tblMemberInfo.Grade_2_Exam_Date DESC , tblMemberInfo.Grade_1_Exam_Date DESC;

which should show all the Exam date. I had updated Grade_5_Exam_Date in an existing record in the table - tblMemberInfo, but this query doesn't show the new update. Any comment please ?

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

9 answers

Sort by: Most helpful
  1. Anonymous
    2024-05-29T12:41:39+00:00

    Hi SumWan,

    Have you refreshed the Form data after the new update?

    Try pressing the F5 key to refresh the Form data.

    If you would like the From data to be refreshed automatically by VBA, you can

    1. Open the Form in Design View;
    2. In the Form Property Sheet, click the Event tab;
    3. Find the "After Update" event for the Form, select [Event Procedure] in the drop-down list;
    4. Click on the builder button (...) and enter the code: Private Sub Form_AfterUpdate() Me.Requery End Sub

    This code tells Access to requery the data underlying a specified form by requerying the source of data for the form, ensuring it displays the latest data from the table.

    1 person found this answer helpful.
    0 comments No comments
  2. Anonymous
    2024-05-29T14:36:18+00:00

    Hi SumWan,

    Have you refreshed the Form data after the new update?

    Try pressing the F5 key to refresh the Form data.

    If you would like the From data to be refreshed automatically by VBA, you can

    1. Open the Form in Design View;
    2. In the Form Property Sheet, click the Event tab;
    3. Find the "After Update" event for the Form, select [Event Procedure] in the drop-down list;
    4. Click on the builder button (...) and enter the code: Private Sub Form_AfterUpdate() Me.Requery End Sub

    This code tells Access to requery the data underlying a specified form by requerying the source of data for the form, ensuring it displays the latest data from the table.

    This is done using embedded macro, I also try to do that manually, but no luck still

    0 comments No comments
  3. Anonymous
    2024-05-29T14:30:52+00:00

    the code retrieve data from the tblMemberInfo and put it in a combo box. After that, another query will search using the selected date from this combo box to retrieve a record to be filled into another combo box. The problem is, the code doesn't seem to be able to retrieve the newly added date in an existing record and display it in the destinated combo box.
    I try to go into the query in the property page and run the query and yet the newly added date is not there. However, looking into the original table tblMemberInfo, the added date is there

    0 comments No comments
  4. George Hepworth 22,765 Reputation points Volunteer Moderator
    2024-05-29T12:48:28+00:00

    If you are viewing the results in a form, the form will need to be refreshed (or requeried) to get the most recent values into the form's recordsource for display.

    0 comments No comments
  5. ScottGem 68,810 Reputation points Volunteer Moderator
    2024-05-29T11:11:00+00:00

    You say you use the query in a form. How do you use it? How are you updating the data? How are you checking the qyery.

    0 comments No comments