By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,099 Members | 2,144 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,099 IT Pros & Developers. It's quick & easy.

Making a control within 1 record of a continuous form invisible

P: 50
Hi guys hope you can help...

...do you have any idea how you can set a control's (within a single record in a continuous form) property to visible=false depending on the outcome of an update within the same record.

i.e. I have a work category combo box within a subcontinuous form... when you update the category to 'absent', I want to make the 'Job Number' control in that record invisible as it is no longer relevant... i don't however want to make EVERY 'Job Number' control invisible throughout the subcontinuous form.

Many thanks in advance

Olly
Apr 23 '08 #1
Share this Question
Share on Google+
2 Replies


Expert Mod 2.5K+
P: 2,545
Hi Olly. In effect there is only one set of controls on a continuous form, which are repeatedly shown for all members in the form's recordset. If you set a control to be invisible it affects all rows shown on screen simultaneously, not just the current row you are on. This leads to disconcerting changes in the appearance of the form depending on the On Current events that fire as users move from row to row.

Need to reconsider the approach, I think, as setting visible on or off is not going to work in this case.

-Stewart
Apr 23 '08 #2

missinglinq
Expert 2.5K+
P: 3,532
Stewart is correct, of course, in stating that this cannot be done using code. However, if you're willing to make a minor change to the appearance of your textbox, you can get it to work through Conditional Formatting.

In Design View, select the JobNumber textbox then goto

Properties - Format and set these Properties:

Backstyle Normal
Back Color 16777215
Special Effect Flat
Border Style Solid
Border Color 12632256
Border Width Hairline

Now, with the textbox still selected, on the menu goto
Format - Conditional Formatting and use

Expression Is [Category] = "absent"

Now set both the Back Color and Fore Color to gray. When the palette for each comes up, it's the gray on the 4th row, right most column. Click Okay and you're set.

LINQ ;0)>
Apr 23 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.