Results 1 to 8 of 8
  1. #1
    Jerseynjphillypa is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Apr 2012
    Posts
    83

    Convert Text to Number

    I have an excel table that I am linking, but it keeps showing up as a Text field while the other tables show up as a Number field. How can I change the Text field into a number field.

    I tried going to the excel source file and changed the column format to Number but it still wouldn't change to a Number field when I tried to link the data again

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Do you want to provide the Excel file 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
    Jerseynjphillypa is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Apr 2012
    Posts
    83
    here is an example of the database.

    the excel file that i link in the db, i need the text column to appear as a number field
    Attached Files Attached Files

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Need numeric data in the Excel column then Access will treat it as a number field. Put something, even just 0, in at least the first data row.
    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.

  5. #5
    Jerseynjphillypa is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Apr 2012
    Posts
    83
    Thanks for the help.

    Since any number, can be a valid answer including 0, but a blank cell indicates that I no longer use the item anymore.

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    That's the only way I could get the field recognized as number. However, even as a text field can still use the values for calculations. Sorting won't work right.
    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.

  7. #7
    Jerseynjphillypa is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Apr 2012
    Posts
    83
    Not sure what you mean by shorting?

    Since I am using the union function to combine multiply tables to one, I have other link tables (20) from excel being pull as a number field while (5) other tables are being pulled as text fields since they all have blank values in the column.

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Sorting - ordering by highest to lowest or lowest to highest. Numbers seen as text will not sort numerically, subject to alpha sort, e.g. 12 would sort before 9.

    Try using Val function on the fields seen as text when building the UNION queries if you are getting a type conflict error.
    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. How to Convert string to Number?
    By taimysho0 in forum Programming
    Replies: 1
    Last Post: 02-24-2012, 01:57 PM
  2. Replies: 2
    Last Post: 11-22-2011, 11:45 AM
  3. Convert auto number
    By JonB1 in forum Access
    Replies: 2
    Last Post: 02-20-2011, 10:26 PM
  4. Convert number to fixed length text field
    By tpcervelo in forum Queries
    Replies: 1
    Last Post: 08-02-2010, 07:26 PM
  5. Number convert to date
    By Argus in forum Programming
    Replies: 1
    Last Post: 08-05-2009, 02:21 PM

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