Results 1 to 4 of 4
  1. #1
    geraldk is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Dec 2011
    Posts
    49

    If Statement Condition - Opening Report

    Hello,



    I have a report that getting it's data from a query, and I would like to check for a value in a text field that is being populatated and if it meets condition for if statement then make another field visible.

    I can do this in a form

    if me.txtField.value =1 then
    me.txtField1.visible = true
    else
    me.txtField1.visible - false
    endif

    Can this be done?

    Thank you in advance.

  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,521
    Yes; you'd do it in the format event of the section containing the textbox (typically the detail section).
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    geraldk is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Dec 2011
    Posts
    49
    Perfect. Thanks!

  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,521
    No problemo!
    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. Report and IF Condition
    By ismailkhannasar in forum Queries
    Replies: 1
    Last Post: 01-31-2013, 04:29 AM
  2. Hide field in sub-report based on condition
    By vinsavant in forum Reports
    Replies: 4
    Last Post: 12-16-2012, 10:18 AM
  3. SDS 3 condition if statement
    By anonix in forum Access
    Replies: 1
    Last Post: 09-07-2012, 12:24 PM
  4. condition background color of report body
    By focosi in forum Reports
    Replies: 2
    Last Post: 09-24-2011, 11:12 AM
  5. Open a report with a date condition
    By Grooz13 in forum Reports
    Replies: 3
    Last Post: 08-02-2010, 02:35 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