Results 1 to 4 of 4
  1. #1
    matydad77 is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    Jun 2014
    Posts
    2

    Calculation in Query - Access is upsetting me

    I have been racking my brain trying to some up with an answer that I just can not seem to find. I am not even sure this is the right forum but I would hope you folks can help me anyways


    The question is below
    "Create a query to display all matching records from the tblProgram and tblMember tables, selecting the Program Type and Monthly Fee fields from the tblProgram table and the FirstName and LastName fields from the tblMember table."
    The problem I am having is it is asking me to add a calulated field named MonthlyFeeStatus as the last column that equals active if the Membership Status field is equal to active and equals not Active otherwise.
    The formula I came up with is: MonthlyStatus: IIf(IsNull([MembershipStatus]),[Active],[Inactive]).
    This formula is asking me to enter a parameter value of "Active" or "InActive". It does not matter what I put in the first field but it copies exactly what I put in the second. If I put abc in the field that is what it will show. Anybody have any suggestions on what I am doing wrong??

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Try:

    MonthlyStatus: IIf(IsNull([MembershipStatus]), "Active", "Inactive")

    [] define field or object names

    Use "" for literal text.
    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
    matydad77 is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    Jun 2014
    Posts
    2
    I tried that and of course it did not work for me. The only thing it returned was Inactive in the required field

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Then MembershipStatus is never null. Is it a Yes/No type field?

    IIf([MembershipStatus]=True, "Inactive", "Active")
    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.

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

Similar Threads

  1. Recent MS Updates upsetting Access
    By bsc in forum Access
    Replies: 2
    Last Post: 01-13-2012, 01:06 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