Results 1 to 4 of 4
  1. #1
    henksaenen is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Nov 2017
    Location
    Orpington
    Posts
    2

    Winner or loser? How can I get a text feedback about a currency/number field

    Hi there, I am not sure if I am posting this in the right section but it is the first time around on a forum like this.

    I am attempting to build a database for my trading activities. A trading journal basically.
    Every trade has two possible outcomes, it's a winner or a loser. The way this can easily be seen is by looking at the Profit & loss field.

    A negative amount is clearly not a winner.

    What I would like to achieve is that there is a field in the database that automatically changes to a W for....you can see it coming...Winners and and L for...you know what I mean.

    I looked at calculated fields but I have no clue how to do this....or even if it can be done at all.

    Any help would be most appreciated

    Henk

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    I'd probably just use Conditional Formatting on a form or report, but I think IIf() works in calculated fields, so something like:

    IIf(ProfitFieldName < 0, "L", "W")
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    henksaenen is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Nov 2017
    Location
    Orpington
    Posts
    2
    Thank you so much! That was exactly what I needed.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Happy to help and welcome to the site!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Combobox subform filter: text field vs. number field
    By Alhassani in forum Programming
    Replies: 2
    Last Post: 07-08-2014, 10:04 AM
  2. Replies: 5
    Last Post: 12-21-2013, 11:19 AM
  3. Replies: 3
    Last Post: 05-29-2012, 04:47 PM
  4. Replies: 2
    Last Post: 03-23-2011, 11:43 AM
  5. program that pick a random winner
    By georges.choueiry in forum Access
    Replies: 4
    Last Post: 09-29-2010, 01:05 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