Results 1 to 6 of 6
  1. #1
    kennethnaga is offline Novice
    Windows 10 Access 2016
    Join Date
    Oct 2019
    Posts
    24

    Question IIf Statement, contains text?

    I have a new field in my query that I'm trying to develop a statement for. Essentially, there are two fields (from a table) containing a chemical test method. Most cases are instances of one field containing a value while the other does not (null). How do I return the value in the new field? I'm very new to Access/queries/VBA/SQL and any help will be appreciated!



    Example:
    Method 1 Method 2 New Field
    D5453 D5453
    D7041 D7041

  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,524
    Try

    Nz(Method1, Method2)
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    kennethnaga is offline Novice
    Windows 10 Access 2016
    Join Date
    Oct 2019
    Posts
    24
    Hi pbaldy, I don't really quite understand

  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,524
    Put that in a new field in your query, fixing the field names as appropriate.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    kennethnaga is offline Novice
    Windows 10 Access 2016
    Join Date
    Oct 2019
    Posts
    24
    Works great, thank you!

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,524
    Happy to help!
    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. Replies: 8
    Last Post: 06-03-2019, 02:57 PM
  2. If statement to remove the text box
    By Erictsang in forum Reports
    Replies: 12
    Last Post: 10-29-2017, 01:15 PM
  3. If statement to alter text box value
    By eskybel in forum Reports
    Replies: 13
    Last Post: 08-05-2013, 06:17 PM
  4. Text Box with if statement
    By Arrrggggjhhhhh!!!! in forum Forms
    Replies: 3
    Last Post: 02-28-2012, 02:40 PM
  5. IIF statement in control source of text box
    By LilMissAttack in forum Reports
    Replies: 11
    Last Post: 08-18-2011, 10:02 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