I'll ask again, why are you setting the Record Source of the form in code?
Yes I know Allen Browne's site but I don't think it mentions anywhere to set the Record Source in code plus it's not related to your problem.
So set the Record Source via the property sheet and open up the query to ensure everything is fine, remove the Me.RecordSource code line, save the form and fire it up and you won't have a problem.
If I thought that it was going to break your db I won't ask you to do it. They both do the exactly the same thing with the exception of one (setting it in code) which sometimes Access finds difficulty resolving the field names whilst the form is loading.
Try it on a copy of your db.
By the way, did you build the SQL in the Query Designer and got it working?
That's strange about Nz() not returning a date. I tested it and it's returning a date type.
Is your RequiredBy field definitely a date/time field? And is Action Register a table?
Well yes but it's seems the Nz() function is returning a string and not a date type like mentioned. I tested this and it tells me the type returned is a Date.
Can you rustle up a quick test db? The table with just the date field, very few test records and the query. Make sure it's not sorting correctly in this test db as well.
Perform a test in the query and tell me what appears:
Code:TypeName(Nz([Action Register].[RequiredBy],#1/12/2099#))
Did you try it on the trouble query?
I need to see a sample db that isn't sorting properly.
Are you using American or UK date format?
So the problem is with Nz(), it will always return a String in a query. Even though the TypeName() shows date, the real type is String.
To preserve the date type use IIF() and IsNull() (or Is Null) in place of Nz()