Results 1 to 4 of 4
  1. #1
    Almeidowski is offline Novice
    Windows 10 Access 2016
    Join Date
    May 2019
    Posts
    2

    Question Add value depending on Calculated

    I don't know if this is the right section to post this, so sorry if it isn't.


    Anyways, I'm new to Access but I'm trying to make a calculated value. I have 4 relevant fields for this question. The first three are numbers and I can easily sum them in the Calculated field expression, but the 4th one is a Yes/No field and I wanted to make so that if the value is Yes, it should add 5, if it's no, it shouldn't add anything.

    Expression:
    ([Field1]*2)+([Field2]*2)+[Field3]

    Thanks for the help and sorry for the english.

  2. #2
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,016
    Replacing Y_N with the actual name of your Yes/No control

    ([Field1] * 2) + ([Field2] * 2) + [Field3] + IIf(Me.Y_N = -1, 5, 0)

    Welcome to AFN!

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  3. #3
    Almeidowski is offline Novice
    Windows 10 Access 2016
    Join Date
    May 2019
    Posts
    2
    Quote Originally Posted by Missinglinq View Post
    Replacing Y_N with the actual name of your Yes/No control

    ([Field1] * 2) + ([Field2] * 2) + [Field3] + IIf(Me.Y_N = -1, 5, 0)

    Welcome to AFN!

    Linq ;0)>
    Appreciated!!

  4. #4
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,016
    Glad we could help!

    Best of luck with your project!

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

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

Similar Threads

  1. Replies: 1
    Last Post: 05-22-2017, 05:59 AM
  2. Adding a value depending on date
    By Access_Novice in forum Queries
    Replies: 4
    Last Post: 03-19-2015, 05:53 PM
  3. Replies: 3
    Last Post: 08-05-2014, 12:52 PM
  4. Create a ComboBox depending from another
    By SaPires in forum Access
    Replies: 2
    Last Post: 06-03-2014, 07:42 AM
  5. change a combobox value depending on another
    By emadaldin in forum Access
    Replies: 3
    Last Post: 01-17-2011, 01:06 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