Continuous Forms - Hide a control in a record?

sierra467

Registered User.
Local time
Yesterday, 21:54
Joined
Aug 1, 2005
Messages
66
I have a form that displays its records in a Contiuous Form. The controls on the form are: txtRecID, txtStudID, cboTrimester, cboType, fld Comment, and blnReqConf.

My issue is that I need the blnReqConf (Request Conference) checkbox and label controls to only show on the reocrds when/if the cboTrimester = "Tri-2" and the cboType = "Parent" or "Teacher" are selected or displayed.

I have written:
Code:
If cboTrimester = "Tri-2" And (cboType.Column(1) = "Teacher" Or cboType.Column(1) = "Parent") Then        
        blnReqConf.Visible = True
        lblReqConf.Visible = True
    Else
        blnReqConf.Visible = False
        lblReqConf.Visible = False
    End If

The problem is that the controls display on all records throughout the form. How do I make it so that the controls are hidden on some records in the continous form and are shown on others based on the criteria? Is it possible?
 
Sierra,

Use the Search facility here and look for "Conditional Formatting" & see
Access Help.

Wayne
 
Thanks Wayne,

I will do that, I looked on the internet some before and only found out how to change colors and how to disable a control, not make it invisible. Thanks fo rthe search term I will take a look using that. I appreciate your help.

Sierra
 
Looked at [link]http://www.lebans.com/conditionalformatting.htm[/link] but it did not have anything on making a checkbox invisible and apparently, conditional formating is not valid on making a checkbox disabled. I am a bit stuck.
 
Sierra,

Wow! I never knew that.

Possible workarounds:

Pub a new field in your query:

txtStatus: IIf([YourBoolean], "Y", "N") <-- You can use Conditional Formatting on this.

If you really need a CheckBox, you can use a TextBox and set the Font
to WingDings (I think WingDings3). It has a Check mark that you can
manipulate (Size/color etc) much better than the Access CheckBox.

Hope some of this helps,
Wayne
 
A way to make a control invisible is to change it's forground and background colors to the same color as the form. Don't forget to also lock the control or the user will tab into the "empty" field. You can change colors with conditional formatting and the locked property doesn't show so it doesn't matter that the locked status is the same for all records as long as it is correct for the current record.
 
Thanks, I will look into that. I do not know much about the conditional formatting, but I will have to learn more about it. Sorry it has taken me so long to reply, forced to another project and had to leave this one, but now I am back on the issue.
 
Hi there,

Further to what has been posted in this thread...

I had a similiar problem in that I wanted to hide a read only control if the value is the same as in the previous record and found this thread while looking for the solution.

In case anyone else has a similiar problem, my solution (in part thanks to the posts in this thread) is in the 'Same Field, previous record' thread:http://www.access-programmers.co.uk/forums/showthread.php?t=14626

Cheers
Craig
 
Last edited:

Users who are viewing this thread

Back
Top Bottom