Results 1 to 3 of 3
  1. #1
    badmem is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Mar 2016
    Posts
    24

    Question Displaying text when a number is <0.1


    Is it possible to display the letter "M" if a number is <0.1. I have a field that subtracts one number from another. If the result is <0.1I would like to store the calculated number but display a note to show that the result is less than the detecable limit. Thank you.

  2. #2
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    I would recommend using a calculated field separate from the calculation (it is usually not a good idea to mix data types in a single field in a database).

    So you have your own field doing your subtraction like this:
    Code:
    Calc1: [Field1] - [Field2]
    and you could have a second calculated field like this:
    Code:
    Calc2: IIF([Field1] - [Field2] < 0.1, "M", "")

  3. #3
    cyanidem's Avatar
    cyanidem is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    Nov 2015
    Location
    Consett, UK
    Posts
    270
    Where would you like to display that "M" letter? On a label next to it? Store it in another field? Are we talking about form or table?
    On the form I would put this in OnCurrent event:
    Code:
    If Me.NumberField < 0.1 Then
        Me.NoteLabel.Caption = "M"
    Else
        MeNoteLabel.Caption = ""
    End If

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: 3
    Last Post: 07-25-2012, 10:35 AM
  4. Replies: 2
    Last Post: 07-21-2012, 01:21 AM
  5. displaying the number of each values
    By hklein in forum Queries
    Replies: 3
    Last Post: 09-02-2011, 09:27 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