Results 1 to 7 of 7
  1. #1
    philliphalljr is offline Novice
    Windows 10 Access 2016
    Join Date
    Dec 2018
    Posts
    8

    If field is populated then value

    Hi again...I am working on a new DB and have hit another wall. I have a table that was imported from an accounting system, the table is made up of thousands of accounts, and maybe 50 columns of data. What I would like is, if a field is populated with anything (most like some text) then it would return a value of lets say the number 1. I thought putting something in criteria would work (>0,1) but it didnt and I am now at a loss. I wish it was a simple yes or no field, but thats not the case....any help is appreciated.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    IIF(IsNull(field),0,1)

  3. #3
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,424
    then it would return a value of lets say the number 1
    to where? in the table or query? I looked at what part of the forum you posted to but got no clue as it isn't in the queries portion.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    philliphalljr is offline Novice
    Windows 10 Access 2016
    Join Date
    Dec 2018
    Posts
    8
    hmmm, it returned a blank query when I entered it in the criteria...

  5. #5
    philliphalljr is offline Novice
    Windows 10 Access 2016
    Join Date
    Dec 2018
    Posts
    8
    Sorry, I dont know how to move it.

  6. #6
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    the formula is in a query field.

  7. #7
    philliphalljr is offline Novice
    Windows 10 Access 2016
    Join Date
    Dec 2018
    Posts
    8
    His solution worked. I was putting it in the wrong spot...Thank you all and sorry for the confusion.

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

Similar Threads

  1. Replies: 4
    Last Post: 02-24-2016, 09:29 AM
  2. Replies: 1
    Last Post: 10-12-2013, 10:08 PM
  3. Time Stamp when field is populated
    By suncluster in forum Access
    Replies: 1
    Last Post: 06-13-2011, 01:39 PM
  4. Replies: 2
    Last Post: 05-06-2011, 02:00 PM
  5. Auto Populated Field not Saving to Table
    By EstesExpress in forum Forms
    Replies: 4
    Last Post: 10-09-2009, 03:33 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