Results 1 to 5 of 5
  1. #1
    mejia.j88 is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Nov 2011
    Location
    california
    Posts
    228

    number to text

    hello all,

    i have made a report that includes a particular field called Saw_Number.
    In the report, the saw being used appears as a number from 1-8.

    saws 7 and 8 are actually a different type of saw, and the report needs to make this clear. i want it to display "Dicer 1" instead of the number 7, and "Dicer 2" instead of the number 8 while keeping the other numbers (1-6)

    what is the best way to do this on my report?



    thanks, Jorge

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    You can use an IIF statement in textbox ControlSource.

    =IIf(Saw_Number = 7, "Dicer 1", IIf(Saw_Number = 8, "Dicer 2", Saw_Number))
    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
    mejia.j88 is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Nov 2011
    Location
    california
    Posts
    228
    when i do that i get #error,
    my saw_no field is set to text.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Is the fieldname Saw_Number or saw_no?
    Does this work better?
    =IIf(saw_no = 7, "Dicer 1", IIf(saw_no = 8, "Dicer 2", saw_no))
    or
    =IIf(saw_no = "7", "Dicer 1", IIf(saw_no = "8", "Dicer 2", saw_no))
    or
    =IIf([saw_no] = 7, "Dicer 1", IIf([saw_no] = 8, "Dicer 2", [saw_no]))

    Make sure the textbox is not named the same as the fieldname to avoid circular reference.
    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
    mejia.j88 is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Nov 2011
    Location
    california
    Posts
    228
    thanks, the last one worked perfectly!

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

Similar Threads

  1. number to text
    By endri81 in forum Programming
    Replies: 3
    Last Post: 06-29-2011, 02:19 AM
  2. transforming text to number
    By eladz949 in forum Import/Export Data
    Replies: 5
    Last Post: 01-05-2011, 04:06 PM
  3. Count Text as Number
    By AccessFreak in forum Forms
    Replies: 1
    Last Post: 01-04-2011, 12:49 PM
  4. Number stored as text
    By Mclaren in forum Programming
    Replies: 1
    Last Post: 05-15-2010, 03:11 AM
  5. Concatenation of Text and Number
    By diane802 in forum Reports
    Replies: 67
    Last Post: 01-26-2010, 03:37 PM

Tags for this Thread

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