Results 1 to 4 of 4
  1. #1
    DB88 is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2014
    Posts
    110

    Number fields exporting as text ???

    Hello,



    I want to export the results of a query to Excel. All of the fields in the query are number fields. But when I export to Excel, the fields are stored as text. In fact I get the error message "number fields stored as text" in Excel.

    Anyone know why this is happening?

    Thanks

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    Does the query have fields created with expressions? Post the sql of the query for analysis.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    DB88 is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2014
    Posts
    110
    Yes, it does have expressions.


    SQL:
    SELECT Nz([RDTE]*(1/[InflationIndex]),0) AS BY_RDTE, Grab_BaselineData.[_kf_year], Nz(IIf([Grab_BaselineData]![_kf_year]>[Grab_BaselineData]![version_CurrentFY],[Grab_BaselineData]![AP_Est],[Grab_BaselineData]![AP_Actual]*(1/[InflationIndex])),0) AS BY_AP, Nz(IIf([Grab_BaselineData]![_kf_year]>[Grab_BaselineData]![version_CurrentFY],[Grab_BaselineData]![OM_Est],[Grab_BaselineData]![OM_Actual]*(1/[InflationIndex])),0) AS BY_OM, [BY_RDTE]+[BY_AP]+[BY_OM] AS BY_Total, Grab_BaselineData.kp_versions
    FROM Inflation INNER JOIN Grab_BaselineData ON (Inflation.Year = Grab_BaselineData.[_kf_year]) AND (Inflation.BaseYear = Grab_BaselineData.BaseYear);

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    Unfortunately, the Nz function actually returns a text value. Try:

    Val(Nz([RDTE]*(1/[InflationIndex]),0))
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 9
    Last Post: 03-22-2013, 06:37 AM
  2. convert number to text number like in cheque
    By ravideep in forum Reports
    Replies: 1
    Last Post: 03-12-2013, 05:55 AM
  3. Replies: 2
    Last Post: 07-21-2012, 01:21 AM
  4. exporting text produces a number
    By greend in forum Import/Export Data
    Replies: 0
    Last Post: 07-12-2006, 03:55 PM
  5. Concatenate two fields (text & number) for key field
    By Larry Elfenbein in forum Forms
    Replies: 2
    Last Post: 11-10-2005, 07:45 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums