I have a navigation form that I want to requery the recordset of a subform when returning from a different form. I'm having a difficult time getting the syntax correctly and need something to help.
Mainform with navigation buttons: ShopOpNavigation
Errors button on Mainform: Opens frmUserErrors Form
FrmUserErrors Form has a button: Add New which opens another form frmAddErrors. All this works fine.
When I return from frmAddErrors to frmUserErrors, I need the data to be refreshed and in descending order.
If I exit the subform and go back, then the new data that was added is there and in descending order. What am I doing wrong that doesn't requery (refresh) the data in descending order when I return from frmAddErrors
Mainform with navigation buttons: ShopOpNavigation
Errors button on Mainform: Opens frmUserErrors Form
FrmUserErrors Form has a button: Add New which opens another form frmAddErrors. All this works fine.
When I return from frmAddErrors to frmUserErrors, I need the data to be refreshed and in descending order.
Code:
frmUserErrors
Recordset: SELECT tblErrors.ErrorId, tblErrors.ErrorDate, tblErrors.ErrorById, tblErrors.ErrorBy, tblErrors.ErrorType, tblErrors.ErrorComments, tblErrors.ErrorPDFLink
FROM tblErrors ORDER BY tblErrors.ErrorDate DESC;
On current and open events:
[Forms]![ShopOpNavigation]![NavigationSubform].[Form].ErrorBy.Requery