Chris,
The cleanest way to do this is to create a class that contains two public properties, an integer and a dataset. Return an instance of that class from the function and test the dataset property for Nothing.
>Hi!
>
>Is there some way to do this?
>
>
>Public Function MyFunction() As Integer or As Dataset
>if blah then
>return dataset
>else
>return 1 'integer value of some kind
>end if
>End Function
>
>
>Thanks