I hope I'm not opening up a standards war here, but what's the best way to handle a function that needs to return multiple values? One group here holds for declaring public variables to hold those values while another holds for including them as ByRef arguments.

In the specific case it's a function that, given partial data, determines whether or not a record containing that data exists in the database. It needs to return information that it found either 0, 1, or more than 1 records containing the information-but if it finds only one record then it also needs to return the ID of that record.

Thanks.