Page 1 of 2 12 LastLast
Results 1 to 15 of 22
  1. #1
    shree is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    May 2012
    Posts
    27

    Continuous Forms text box if null then disable

    Hi all,

    I have one Db in forms Form3 its gives me the individual brokers total on continuous form,

    i want to hide the text box if total is "0"

    i have used: on Current

    Private Sub Form_Current() If Me.BAL = 0 Then


    Me.Detail.Visible = False


    End If
    End Sub


    even text box but its hide all detail or text boxes even there are value.

    i want to hide only those text box which value is null means 0


    please find the attachment and refer form3 on concatenate - AD40123 , Entry Date - 27-04-2012



    and press click me button. Thanks!!
    Attached Files Attached Files

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Conditional Formatting will allow you to disable individual TextBoxes but hiding them is a different story.

  3. #3
    shree is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    May 2012
    Posts
    27
    Thanks for your reply !!! I want disable not hide, apologies for that and it is possible through condition format but how could you please explain it would be great for me thanks!!!

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Have you played with Conditional Formattiong yet? In design view just RightClick on the control and select ConditionalFormat. Then try some of the variations until you get it the way you want. Post back here if your still having trouble and we can help.

  5. #5
    shree is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    May 2012
    Posts
    27
    yes i know but not much please help me on expression on how to disable.

    could you please help on expression....

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I would start with IF FIELD VALUE IS = 0 and select the disable icon (on the right) and give it a try.

  7. #7
    shree is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    May 2012
    Posts
    27
    Hi and what about the hide actually i want to hide the boxes both Broker Name and Bal if value is 0 please sorry!!!!

  8. #8
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    It is a Continuous Form but you do not want there to be an even number of fields (controls) in each record?

  9. #9
    shree is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    May 2012
    Posts
    27
    Thanks!! actually what i want is Bal is 0 it for that broker name and Bal text boxes should not be display in detail, if there value is greater than 0 or less than 0 it should display.

  10. #10
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,633
    I never noticed the enable/disable icon on the conditional formatting dialog. Maybe is new to 2010, will have to check my 2007 version later.

    So if it is not on the 2007 version, will need to use code to enable/disable control. I use only VBA, don't know if macro can do it.
    Private Sub Form_Current()
    Me.Bal.Visible = Nz(Me.Bal) <> 0
    End Sub
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  11. #11
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Quote Originally Posted by shree View Post
    Thanks!! actually what i want is Bal is 0 it for that broker name and Bal text boxes should not be display in detail, if there value is greater than 0 or less than 0 it should display.
    How about *not* pulling the record when the Bal = 0? Do it in the query.

  12. #12
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,633
    Right, if you don't want name or bal to show, why retrieve the record and end up with blank space because the control is still populated, just not visible.

    I just tested the enable icon setting of conditional formatting. The control is disabled but still visible.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  13. #13
    shree is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    May 2012
    Posts
    27
    Hi JUNE, For your VBA code i have used in on current but "me.Bal.value there is no argument for visible after . there is only value is showing

    instead of bal i took text25 its working but both detail texts are disappear even one has BNP has position (value)

  14. #14
    shree is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    May 2012
    Posts
    27
    hi june what should i do ?

  15. #15
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Quote Originally Posted by June7 View Post
    ...I never noticed the enable/disable icon on the conditional formatting dialog. Maybe is new to 2010, will have to check my 2007 version later.
    Nope! It's definitely been there since 2003 and I believe it's been there since the beginning of CF, v2000. It's the last icon on the right, just beyond the big A of the Font/Fore Color icon. To me it's always looked like a small button that has been disabled itself! I think I was using v2000 for six months before I noticed it!

    I think the only change made to Conditional Formatting, since the Access Gnomes first spit it out, is the rumored extension of the number of Conditions allowed from three (plus the Default) to a reported 10/20/50 (depending on the rumor source) in v2010!

    Linq ;0)>

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 07-30-2011, 03:21 PM
  2. Continuous Form Disable Command Button
    By mbake085 in forum Programming
    Replies: 4
    Last Post: 05-27-2011, 08:55 AM
  3. Continuous forms records missing
    By KWarzala in forum Forms
    Replies: 2
    Last Post: 12-28-2010, 12:42 PM
  4. Replies: 2
    Last Post: 10-16-2009, 02:47 PM
  5. Replies: 3
    Last Post: 09-06-2008, 10:19 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