Results 1 to 4 of 4
  1. #1
    Niki is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Apr 2011
    Posts
    32

    Expression to conditionally omit info

    How would I phrase an expression in a query asking it not to include info in a certain record if there is other info in the first record?



    For instance, if a record shows 1 or greater in a field, I don't need to have the info added in for field 2. If it shows <1, I would need field 2 added in for the total to equal at least 1.

    =if[column1!Status]=> 1, then leave column 2 blank????

    Thanks!

  2. #2
    NTC is offline VIP
    Windows Vista Access 2007
    Join Date
    Nov 2009
    Posts
    2,392
    you ask about a query, but users don't enter data into queries; are you working at the form level?

    calculated fields are straightforward at the query level. you want to research the iif method (there is no 'if' in queries).....

    but if this does involve user input - then your calculation can occur at the form level rather than the query (record source level) ....

  3. #3
    Niki is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Apr 2011
    Posts
    32
    I'm querying my table and would like it to return a value only if the same value does not exist in another field. So, the iif seems to be it, but I can't figure out what it needs to say exactly.

  4. #4
    Niki is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Apr 2011
    Posts
    32
    Here is my zipped DB. In the query WIP, I'd like to create the criteria that basically says:

    If a protein is selected in qryProtein whose Grain >1, no qryGrain.

    I'd like to create that same expression for other items who have more than one meal component.

    Help - please & thank you!

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

Similar Threads

  1. Replies: 2
    Last Post: 04-20-2011, 01:50 PM
  2. Replies: 3
    Last Post: 01-31-2011, 11:47 AM
  3. Conditionally hide detail row in report
    By martinjamesward in forum Reports
    Replies: 5
    Last Post: 09-06-2010, 02:51 AM
  4. Linking tables conditionally
    By dcurtis in forum Access
    Replies: 1
    Last Post: 05-05-2010, 03:45 PM
  5. omit word in entry for alphabetical order
    By airhud86 in forum Access
    Replies: 1
    Last Post: 12-14-2009, 03:49 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