Exporting & retaining field type
am 29.10.2007 20:05:46 von Coll
I have a select query with many fields. One of the field uses a
function -
LengthService: IIf(False,0,losactives([activeemp]![empdate]))
The field should function as a numeric field. When I export it to
excel, I can sort it numerically. However, when my coworker exports
the same query, this field appears in excel as a text field, and she
can't sort it properly. Any ideas? I'm not sure if this is a result of
excel or of access. Any help is appreciated.
Re: Exporting & retaining field type
am 29.10.2007 21:11:56 von Salad
Coll wrote:
> I have a select query with many fields. One of the field uses a
> function -
>
> LengthService: IIf(False,0,losactives([activeemp]![empdate]))
>
> The field should function as a numeric field. When I export it to
> excel, I can sort it numerically. However, when my coworker exports
> the same query, this field appears in excel as a text field, and she
> can't sort it properly. Any ideas? I'm not sure if this is a result of
> excel or of access. Any help is appreciated.
>
Maybe force it to a numeric
LengthService: Clng(IIf(False,0,losactives([activeemp]![empdate])))
Is Losactives a function? What type are you returning if so? Maybe set
it to return an int or long.
Re: Exporting & retaining field type
am 29.10.2007 22:12:25 von Coll
On Oct 29, 4:11 pm, Salad wrote:
> Coll wrote:
> > I have a select query with many fields. One of the field uses a
> > function -
>
> > LengthService: IIf(False,0,losactives([activeemp]![empdate]))
>
> > The field should function as a numeric field. When I export it to
> > excel, I can sort it numerically. However, when my coworker exports
> > the same query, this field appears in excel as a text field, and she
> > can't sort it properly. Any ideas? I'm not sure if this is a result of
> > excel or of access. Any help is appreciated.
>
> Maybe force it to a numeric
> LengthService: Clng(IIf(False,0,losactives([activeemp]![empdate])))
>
> Is Losactives a function? What type are you returning if so? Maybe set
> it to return an int or long.
Losactives is a function. I did not specify a type. I had tried a few
things, but was running into issues control the number of decimals, so
I removed the type reference.
I will try the numeric force and reply with the results.