Minggu, 17 Februari 2013

RE: [MS_AccessPros] Object visibility

 

Paul

You will have to put the code in the form's Current event so it checks each
record.

And here is a shorter version:

Dim bolShowCtrl as Boolean

bolShowCtrl = (If cboServiceProvider = "Advant-Edge Solutions"_
lblChemoWaste.Visible = bolShowCtrl
txtChemoWaste.Visible = bolShowCtrl

Regards,
Bill Mosca,
Founder, MS_Access_Professionals
That'll do IT http://thatlldoit.com/> http://thatlldoit.com
MS Access MVP

https://mvp.support.microsoft.com/profile=C4D9F5E7-BB03-4291-B816-64270730881E>
https://mvp.support.microsoft.com/profile=C4D9F5E7-BB03-4291-B816-64270730881E

My Nothing-to-do-with Access blog

http://wrmosca.wordpress.com> http://wrmosca.wordpress.com

From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of paulc8481
Sent: Sunday, February 17, 2013 10:32 AM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Object visibility

I am trying to get a field to appear and disappear when a certain value is
entered in a textbox. I have been able get the text box to appear when the
correct value is selected and disappear when the value is changed to another
value, but if I choose to make the textbox blank the other textbox does not
disappear. Also when the textbox is visible it remains visible when scrolling
through all the other records even when the value in the textbox changes to a
value that should make it go blank. below is the code I am using.

Any help would be appreciated.

Thanks Paul

Private Sub cboServiceProvider_AfterUpdate()

If cboServiceProvider = "Advant-Edge Solutions" Then

lblChemoWaste.Visible = True

txtChemoWaste.Visible = True

ElseIf cboServiceProvider <> "Advant-Edge Solutions" Or cboServiceProvider.Value
= " " Then

lblChemoWaste.Visible = False

txtChemoWaste.Visible = False

End If

End Sub

[Non-text portions of this message have been removed]

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (2)
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar