Results 1 to 2 of 2
  1. #1
    RawToast is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Dec 2014
    Posts
    7

    Basic If Statement Not Working


    Could not figure out why my calculated field wasn't working. Stripped the whole thing down until I had just a plain If statement, and even that won't work! What is broken here?
    Click image for larger version. 

Name:	Table.png 
Views:	13 
Size:	97.4 KB 
ID:	19103
    The expression simply refuses to recognize anything in any of the columns I want to check on. Could it be because I'm using a Value List?
    Click image for larger version. 

Name:	TableDesign.png 
Views:	13 
Size:	55.9 KB 
ID:	19104

    Let me know if I can take screen shots of anything else. I can not post the database itself for security reasons.

    Thank you for your time!

  2. #2
    RawToast is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Dec 2014
    Posts
    7
    Solved:
    Okay, so through some experimentation I discovered that my problem with expressions was only happening for columns with ListBoxes. I looked everywhere online for instructions on how to do expressions with a ListBox, but could not find anything. On a hunch, I guessed that the options in a ListBox might be numbered. Tada! That is the solution. So instead of "If([1a]="Yes"..." I have to write "If([1a]="1"...".

    If you want to refer to values in a Listbox that contains "Yes";"No";"Other", 0=Yes, 1=No, 2=Other.

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

Similar Threads

  1. Replies: 2
    Last Post: 11-03-2014, 08:34 AM
  2. Replies: 6
    Last Post: 02-24-2014, 09:26 AM
  3. basic functions are not working in MS Access
    By itm in forum Programming
    Replies: 3
    Last Post: 10-19-2012, 09:58 AM
  4. If statement not working
    By gkaro in forum Queries
    Replies: 10
    Last Post: 02-15-2012, 01:58 AM
  5. Replies: 2
    Last Post: 10-13-2011, 09:14 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