Can't change format of field output from query (1 Viewer)

Nicola

New member
Local time
Today, 12:51
Joined
Oct 3, 2000
Messages
8
I have a 'make-table' query in which I have several calculated IIf expressions. I need the resulting fields in the table to be formatted as number fields rather than text - so that I can add the fields together in a report. For some reason I can't seem to achieve this...it's driving me mad!!

Can anyone help?

Many thanks.
 

Nicola

New member
Local time
Today, 12:51
Joined
Oct 3, 2000
Messages
8
I've overcome the problem now.

As you can't change the type of the field from within the query I have now changed the query so that it is an 'append' query rather than a 'make table'.

I have set up the table that the report is based on as I need it to be, and then each time the query is run I delete the old informtaion in the table and append the new query results into it. This way the format of the data types within the table stay the same.

The reason for having to use the table now is to be able to manipulate the data types as I can't do this on calculated fields within the query.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 07:51
Joined
Feb 19, 2002
Messages
43,223
You CAN manipulate data types in a query. You don't need to make a holding table. Just use the appropriate function -
Select CLng(SomeField) As SomeField, CInt(SomeOtherField) As SomeOtherField, etc.
 

Users who are viewing this thread

Top Bottom