Well, you can simplify your code like this
Me.OrderByOn = True
If Me.chkAscend Then
Me.OrderBy = "fldDateIn Asc"
Else
Me.OrderBy = "fldDateIn Desc"
End If
Because an IF statement resolves to true or false and a checkbox is either true or false...
EXCEPT if you have a triple state property set to yes. In that case, it can be NULL and it could be the source of your error. Make sure the triple state property is set to no and your checkbox has a default value of either true or false.
Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
|