Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / July 2005

Tip: Looking for answers? Try searching our database.

visibility of a label

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Vincdc - 12 Jul 2005 17:36 GMT
Hello:
I have a combo box on my form. If the user chose N, then the label next to
it will show up; if Y, then not. When the form is open, the following VB code
works well, but after I save the record, close the form and re-open the form,
it does not work. You will see the label next to the combo box for every
record. Here is the code.

Private Sub TestFORM_AfterUpdate()
   If Me.TestFORM = "N" Then
       Me.Label100.Visible = True
   Else: Me.Label100.Visible = False
   End If
End Sub

Any suggestion on it?
Thanks in advance!
Klatuu - 12 Jul 2005 18:19 GMT
Try adding the same logic to the On Current event of your form.  Leave it in
the After Update event of testFORM as well so when it changes, the label will
respond.  Also, just for grins, here is a one liner that doest the same thing.

Me.Label100.Visible = Me.TestFORM = "N" Then

> Hello:
> I have a combo box on my form. If the user chose N, then the label next to
[quoted text clipped - 12 lines]
> Any suggestion on it?
> Thanks in advance!
Vincdc - 12 Jul 2005 19:43 GMT
It works. Thanks a lot!

> Try adding the same logic to the On Current event of your form.  Leave it in
> the After Update event of testFORM as well so when it changes, the label will
[quoted text clipped - 18 lines]
> > Any suggestion on it?
> > Thanks in advance!
Klatuu - 12 Jul 2005 18:20 GMT
Take the then off the end of that.  After I clicked post, I saw I had not
finished my copy/paste.

> Hello:
> I have a combo box on my form. If the user chose N, then the label next to
[quoted text clipped - 12 lines]
> Any suggestion on it?
> Thanks in advance!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.