Microsoft Access Disable Button on Continuous Form
-
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 Subeven 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!!
-
Conditional Formatting will allow you to disable individual TextBoxes but hiding them is a different story.
-
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!!!
-
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.
-
yes i know but not much please help me on expression on how to disable.
could you please help on expression....
-
I would start with IF FIELD VALUE IS = 0 and select the disable icon (on the right) and give it a try.
-
Hi and what about the hide actually i want to hide the boxes both Broker Name and Bal if value is 0 please sorry!!!!
-
It is a Continuous Form but you do not want there to be an even number of fields (controls) in each record?
-
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.
-
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
-
Originally Posted by shree
-
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.
-
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)
-
hi june what should i do ?
-
Originally Posted by June7
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)>
The problem with making anything foolproof...is that fools are so darn ingenious!
All posts/responses based on Access 2003/2007
Source: https://www.accessforums.net/showthread.php?t=24969