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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top