How Come Query Runs But Doesn't Sort

  • Thread starter Thread starter doyle60
  • Start date Start date
D

doyle60

I have a query that runs just fine. But when I try to sort any one of
its fields, I get an error.

It is a union query.

The error message is:

"Cannot open anymore databases." The Help is blank.

By the way, the query works when the database is not split. When it is
split, the error occurs.

I have a feeling it may have something to do with the fact that one
field in the union query consists of all numbers. But the field in the
tables is really a text field. I have had experience with Union
queries redefining text fields as numeric fields. How do I get the
union to understand it is a text field?

But I'm not certain if this will solve the problem, however.

Thanks,

Matt
 
Either use CStr(number) to convert the numeric part of the union to a string
or use CInt(Text) or CLng(Text) to convert the string in the union to the
relevant numeric data type
 
Back
Top