A family of Microsoft relational database management systems designed for ease of use.
Try with the Recordset Type changed to Dynaset (Inconsistent Updates).
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have a subform that displays a subset of records based on a value entered in the main form. The data is all the records for a specific language and I want to sort them by priority, but I want null values to be at the end of the list, not the beginning. I then need to be able to update the priority field in the subform.
So with the following data, I want to show it in priority sequence and then be able to update the priority and save. This would include updating priorities that have previously been entered and entering priorities that were previously null
Course | Priority
Course A | 1
Course B | 2
Course C | null
I've added this code to the Order By in the subform
IIF([Translation Priority] IS NULL, 1, 0), [Translation Priority]
Which orders the rows correctly, but then I can't update the field. Am I trying to do the impossible? Any recommendations for a different design/method to try?
The database backend is running on an Azure SQL server.
Thanks for any help.
A family of Microsoft relational database management systems designed for ease of use.
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.
Answer accepted by question author
Try with the Recordset Type changed to Dynaset (Inconsistent Updates).
Answer accepted by question author
Adding an expression to the Order By property of a form should not affect the ability to edit the values in fields. You can't edit controls with a control source beginning with "=". You don't need to display the value in the form in order to be able to use it for sorting.
I would probably use:
Sort By: Nz([Translation Priority],9999)
Can we assume [Translation Priority] is a numeric field?
That fixed the update issue I was having. Thanks Doug
Merrikay
Thanks, Duane.
Yes, [Translation Priority] is a numeric field. Your code works, but I can't update the field. I CAN update other fields in the form. When I take out the ORDER BY entry, the sequence is incorrect, but I can update the field.
Here is the Property Sheet for the subform. See anything obvious?
(Don't worry that "Priority" is missing the final "y" That is correct.
Thanks,
Merrikay