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 / May 2007

Tip: Looking for answers? Try searching our database.

Changing Controls

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Import Text File - 05 May 2007 12:55 GMT
i ask if there is a way to change a control's property but in only a certain
record

in another words
i have a form which is tabular
there is a controal it's type is CheckBox
all i want is to make this chack box is disabled in a certain record depends
on a condition
and the rest if the check box instances in the other records are still enabled

thak for your time and cooperation?
Daniel - 05 May 2007 16:30 GMT
Use the OnCurrent Event and use the enabled control property.

The OnCurrent is triggered everytime you change records.  Use your condition
to control whether or not your chosen control is enabled or not.

Me.ControlName.Enabled = True  'User can access the control
Me.ControlName.Enabled = False 'User cannot access the control
Signature

Hope this helps,

Daniel P

> i ask if there is a way to change a control's property but in only a certain
> record
[quoted text clipped - 7 lines]
>
> thak for your time and cooperation?
Import Text File - 13 May 2007 08:26 GMT
Dear Daniel,

i've already tried this one before but this form is continous so it apllied
on all records not this record only

> Use the OnCurrent Event and use the enabled control property.
>
[quoted text clipped - 15 lines]
> >
> > thak for your time and cooperation?
missinglinq - 13 May 2007 12:49 GMT
Actually, Daniel's code will WORK, but it's not very pretty! It's true that
the check boxes on all the records will be enabled/disabled depending on the
condition of whichever record has focus. If RecordA's condition dictates that
the checkbox be enabled, all checkboxes will be enabled. But if you try to
click on the checkbox in RecordB, whose condition dictates that the checkbox
be disabled, you won't be able to, because RecordB now has focus, and all the
checkboxes are now disabled! Also, if you try to click on the checkbox of a
record where the checkbox should be enabled, but the previous record with
focus had the checkbox disabled, you'll have to click twice to get the box
checked! The first click gives focus to the record and the second click
actually checks the box. As I said, it will function, but it's not pretty!
The only real way to deal with formatting records in a continuous form is
thru Conditional Formatting, and unfortunately, Conditional Formatting is not
supported for Checkboxes.

Signature

There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

 
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



©2009 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.