Results 1 to 3 of 3
  1. #1
    scoe is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2013
    Posts
    91

    Calculated fields showing Type error

    Hi



    I hope someone can help as I cannot find a suitable solution on the web at present.

    I have the following calculation in a field in an access form, the problem is that when [Text16] is empty I am getting the #Type! error and I need it to be blank.
    I would be grateful of any suggestions.

    =IIf([2PR]>0,[Text18]-[Text16])

    Thank you

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    It means you are trying to do math on strings.
    You can try converting the text boxes to values.

    (val([2PR])>0,val([Text18])-val([Text16]))


    note: you can rename your boxes to make sense, in the properties, other tab, name
    txtTotal, or txtIncome.

  3. #3
    scoe is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2013
    Posts
    91
    Thank you that worked perfectly

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

Similar Threads

  1. Replies: 15
    Last Post: 04-16-2014, 01:15 PM
  2. Calculated Fields Not Showing Up
    By egorzik in forum Access
    Replies: 2
    Last Post: 02-07-2014, 03:44 PM
  3. Replies: 12
    Last Post: 10-01-2013, 12:59 PM
  4. Replies: 8
    Last Post: 08-09-2012, 07:04 PM
  5. Calculated Field not showing
    By imintrouble in forum Access
    Replies: 2
    Last Post: 02-09-2012, 03:14 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