Results 1 to 2 of 2

Thread: MS ACCESS report . Do not display field if certain condition not met.

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2004
    Posts
    1

    MS ACCESS report . Do not display field if certain condition not met.

    I have a report that reads a a checklist of info. I am using an IIF statement to determine whether or not to show field on my report. I only know how to get the field not to display (the negative of the IIF displays as""). I want to find out how to avoid holding a place, and having the report read the rows in consecutive order. THe Report sort of looks like this like this now.

    RESULTS
    Did not complete 1
    Did not complete 2

    Did not complate 4

    Did not complete 6

    I want it to display like this

    RESULTS
    Did not complete 1
    Did not complete 2
    Did not complate 4
    Did not complete 6

    I dont want to hold a space for that is blank. How do I control the field so that IIF returns it as empty so the Can Shirk control can kick in. Can I control the CanShrink in the IIF? I am not a very experienced developer. As you can tell. Any help would be appreciated.

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709
    Where is your IIF code?

    In the code behind the report you can add the "Private Sub
    Detail_Format(Cancel As Integer, FormatCount As Integer)"
    procedure. Then code the IIf and if the negative condition occurs
    then you Cancel = True.

    This will prevent the report from formatting the line where the
    condition is negative and the blank line will be suppressed.

    RESULTS
    Did not complete 1
    Did not complete 2
    Did not complate 4
    Did not complete 6

    HTH
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width