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 / June 2005

Tip: Looking for answers? Try searching our database.

Making Control Visible only if a condition on another field is met

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
scorpiorc - 30 Jun 2005 14:28 GMT
I am working on a form which displays records on continuous forms view, and I
want a check box to become visible on each record only if another field in
the form meets a certain criteria.  I just can't get it to work correctly.  
What I'm trying to do is that if the field named Keep = 0, then the CheckBox1
will be visible, but if Keep = -1, then CheckBox1 will not be visible.

The code I have now is:
If Me.Keep = -1 Then
Me.CheckBox1.Visible = False
End If

But what happens is that the checkbox is never visible

Any suggestions on how to do this?
Rick B - 30 Jun 2005 15:05 GMT
Code has to be tied to an event.  That event determines when the code runs.
Sharing that with us is almost as important as sharing the code itself.
Where is this code?

Signature

Rick B

> I am working on a form which displays records on continuous forms view, and I
> want a check box to become visible on each record only if another field in
[quoted text clipped - 10 lines]
>
> Any suggestions on how to do this?
scorpiorc - 30 Jun 2005 16:54 GMT
The form opens, the user is asked to type in some information.  After that
information is entered, the records are retrieved and are displayed in
continuous forms view.  One of the fields in this continuous forms view is
the checkbox that I want to be visible or invisible depending on the value in
another field.

I have tried putting the code in OnOpen for the form and also tried
AfterUpdate to run after the user enters their information, but neither place
made this work correctly.

> Code has to be tied to an event.  That event determines when the code runs.
> Sharing that with us is almost as important as sharing the code itself.
[quoted text clipped - 16 lines]
> >
> > Any suggestions on how to do this?
Rick B - 30 Jun 2005 16:59 GMT
I think it has to go in the "on curent" event of the subform.  If the
subform is in DATASHEET view, I don't think it will work.

(I'm not 100% sure it will work at all since you are not hitting each
record)

Using conditional formatting might be a better way to do this.

Signature

Rick B

> The form opens, the user is asked to type in some information.  After that
> information is entered, the records are retrieved and are displayed in
[quoted text clipped - 26 lines]
> > >
> > > Any suggestions on how to do this?
scorpiorc - 30 Jun 2005 17:09 GMT
I will try that.  I tried conditional formatting as my very first option, but
Access won't give me the option to use that type of formatting on a checkbox.

> I think it has to go in the "on curent" event of the subform.  If the
> subform is in DATASHEET view, I don't think it will work.
[quoted text clipped - 40 lines]
> > > >
> > > > Any suggestions on how to do this?
 
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.