how to set data type to certain field in a Make Table

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bluemoon9
    New Member
    • Oct 2008
    • 56

    how to set data type to certain field in a Make Table

    Hi all,
    I have this querry, when I run the query, it makes the table name "tmaCustome r", but I would like to set the field "TotalCompliant " as Text, instead of Number, any idea?
    When the table has created after running the query, the field "TotalCompliant " was automatically set to "Number".
    Code:
    SELECT [qrycustomer #3].Facility,
           1 AS [Order],
           Format([MonthYear],"mmmm") AS [Month],
           DatePart("yyyy",[MonthYear]) AS [Year],
           "Compliant Observations" AS Items,
           [qryCustomer #3].TotalCompliant AS Result INTO tmaCustomer
    FROM [qryCustomer #3];
    thanks!

    Bluemoon
    Last edited by NeoPa; Jan 3 '10, 10:50 PM. Reason: Please use the [CODE] tags provided
  • ajalwaysus
    Recognized Expert Contributor
    • Jul 2009
    • 266

    #2
    Try:

    Code:
    SELECT [qrycustomer #3].Facility
    , 1 AS [Order], Format([MonthYear],"mmmm") AS [Month]
    , DatePart("yyyy",[MonthYear]) AS [Year]
    , "Compliant Observations" AS Items
    , CStr([qryCustomer #3].TotalCompliant) AS Result 
    INTO tmaCustomer
    FROM [qryCustomer #3];
    and if this doesn't work, please post qryCustomer #3 code.

    -AJ

    Comment

    • bluemoon9
      New Member
      • Oct 2008
      • 56

      #3
      it worked very well.
      thank you so much for your help.
      Have a happy new year.

      bluemoon

      Comment

      Working...