Results 1 to 7 of 7
  1. #1
    matey56 is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Jul 2020
    Posts
    188

    IF statement in report

    Hi all,


    I have a form with several fields that have numbers for the data (1, 2, 3, etc.) In my report I'd like those fields where there's data to show as checkmarks or X's. If the field is blank, no check of course. How can I write a statement in my report to do that?

  2. #2
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,933
    Use a checkbox with your number field as its control source.

    Wih an access Boolean ((which a checkbox represents) 0 is false and any other value is true

  3. #3
    matey56 is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Jul 2020
    Posts
    188
    Quote Originally Posted by CJ_London View Post
    Use a checkbox with your number field as its control source.

    Wih an access Boolean ((which a checkbox represents) 0 is false and any other value is true
    I forgot to mention some of the fields have text and some have digits. I created the checkboxes and used the aforementioned fields as controls. If the field contains any text=check and if it's blank=no check. How do I write that statement and where does it go?

  4. #4
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,933
    For text use something like
    =len(fieldname)

  5. #5
    matey56 is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Jul 2020
    Posts
    188
    Quote Originally Posted by CJ_London View Post
    For text use something like
    =len(fieldname)
    Where does that statement go?

  6. #6
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,933
    in the controlsource of the checkbox control

  7. #7
    matey56 is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Jul 2020
    Posts
    188
    Quote Originally Posted by CJ_London View Post
    in the controlsource of the checkbox control
    That worked perfectly, thank you!

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

Similar Threads

  1. Report If/Then Statement in Report Footer
    By Pennypinscher in forum Reports
    Replies: 4
    Last Post: 07-31-2020, 05:11 PM
  2. Account Statement Report
    By Freddie81 in forum Reports
    Replies: 1
    Last Post: 07-25-2018, 09:45 AM
  3. Help with If Statement in Access Report
    By jpfulton248 in forum Reports
    Replies: 1
    Last Post: 08-05-2015, 09:57 AM
  4. Help with if statement in report
    By Nixx1401 in forum Reports
    Replies: 1
    Last Post: 07-02-2010, 07:43 AM
  5. If Statement in Report
    By Nixx1401 in forum Reports
    Replies: 3
    Last Post: 07-01-2010, 04:14 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