Enabling and Disabling controls on the form

aleks1429

Registered User.
Local time
Today, 03:27
Joined
Apr 13, 2004
Messages
12
I have a bound form that is set to continueous mode. When I double click the form it displays

Form Properties:

Default View: Continuous Forms
Record Source: QUERY
Cycle: All Records

In design mode, the form consists of check boxes text fields and combo boxes, all bound to values from the QUERY, so each row in a table represents a record on this form.

When I double click the form, I want to be able to disable some of the controls that for instance have First Name equal to "Alex". I have the conditional, I just don't know where to put it so that it effects all the records that are coming out during load time.

I tried On Open Event but it only works for the first record, but not for the rest. So, if I had 10 records and the form displays all of them, the form will only disable or enable the first record.

Can anyone help me here?

Thanks,
Alex
 
use conditional formatting and select Expression Is: and enter the expression you want there.
 
It won't work....

I forgot to mention that all the records must be outputed from the bound table, and only the records that fall into a conditional category must be disabled, but the rest must be enabled.
 
yes it works i've just tried it. select all the fields you have on the form and go to format -> conditional formatting.

choose Expression is: and enter your expression such as [fieldname] = value

Then click on the last button which is enabled/disabled
 
Conditional formatting???

I am not seeing Conditional formatting property. I am sorry, but can you me be more descriptive, I am new to Access, I don't know my around as well as you do.

choose Expression is: and enter your expression such as [fieldname] = value

Then click on the last button which is enabled/disabled
 
which version of Access are you using ? Conditional Formatting is available from Access 2000 and newer versions. if you are using Acc97, sorry it can't be done with Conditional Formatting.
 
Access 2003

I am using Access 2003, I did just what you told me: I selected all the fields in the Detail pane, clicked on the Format Tab: here are the properties that are available:

Visible
Display When
Left
Top
Width
Height
Special Effect
Border Style
Border Width
Border Color
 
don't click on the Format tab of the property window ... click on the Format menu which you have on top ... File, Edit, View, Insert, Format etc
 
Conditional formatting...

I selected expression equals to [txtName], but I it didn't disable anything, it looks like that the Conditional Formatting is more for the actual look of the control, no?

Or maybe I am not using it right.
 
is it possible that you upload a sample of your db, however, i am not sure if i manage to set it for you right now, because i shall be leaving soon.
 
here is a sample

i created a generic example exactly what i am trying to do....file attached
 

Attachments

see attached file i disabled the record that have a value of "two".
 

Attachments

Users who are viewing this thread

Back
Top Bottom