Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Specifying Data Type in Query 1

Status
Not open for further replies.

kdowney

IS-IT--Management
Oct 9, 2002
8
US
Help!! I'm having trouble with a created field in a make-table query that is creating the wrong data type! The statement in the query is: Pick-Up: IIf([ES]<[Forms]![Form1]![Text0],IIf([CAL]<>97,IIf([CAL]<>52,&quot;1&quot;,&quot;&quot;),&quot;&quot;),&quot;&quot;)

So, the query looks for a couple of conditions. If the data meets the conditions, a &quot;1&quot; is placed in the field. If the conditions are NOT met, the field should remain blank.

The query appears to works fine, and places the 1 in the field for those records who meet the criteria; however ........ In the TABLE the query creates, this field shows up as a data type of TEXT. I need this field to have a data type of NUMERIC. Because I have a number of reports based off this data, I can't continue to manually change the data type each time I run the query. What have I done wrong? Anyone have any suggestions?

Thanks!
 
&quot;1&quot; is a character (text), 1 is a number.

Now about the blanks, I don't know. I wouldn't be surprised to hear that &quot;&quot; is treated as a null or no value. But if not, how about 0?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top