Nz function

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to sort a list of items in ascending order, with those records null in the priority field appearin
last in the list.

Here is my code

Me.OrderBy = Nz(Me.Priority, 99
Me.OrderByOn = Tru

The datatype for Me.Priority is integer. The above does not work. Access doesn't recognize the "99" as an integer
Any suggestions
Thanks so much!
 
----- smk2 wrote: ----

I would like to sort a list of items in ascending order, with those records null in the priority field appearin
last in the list.

Here is my code

Me.OrderBy = Nz(Me.Priority, 99
Me.OrderByOn = Tru

The datatype for Me.Priority is integer. The above does not work. Access doesn't recognize the "99" as an integer
Any suggestions
Thanks so much

Hi smk2
have you tried using a data conversion function? for exampl

Me.OrderBy = CInt(Nz(Me.Priority, 99)

Luc
Jonathan
 
Back
Top