Continuous Forms custom view for each record

buratti

Registered User.
Local time
Today, 07:36
Joined
Jul 8, 2009
Messages
234
I have a form in continuous forms view and I need to rather view or hide certain controls based on other criteria, but only for those records and not all records. For a simple example (not an actual example, just ease of understanding one), lets say I have a form with a checkbox field and a field called Control1 (amongst other fields) viewed in continuous forms view. If the checkbox is checked, I need to show control1 for that record, if it is not checked, hide Control1. So lets say that the first record in the form control1 is visible, the second record it is hidded, 3rd and 4th it is visible again and so on.

Everything i have tried so far shows or hides my control on all records and not just the ones I need them to. Is this possible and how would I acomplish this? And by the way I have looked at conditional formatting already, and it just doesn't have the ability to accomplish this in the way I need, so other suggestions are needed. Thanks!
 
Take a look at Conditial Formatting. Never tried to hide a control but in theory should work and is the only thing you can to make each record act on its own based on a record level criteria.
 
You really cannot make a Control conditionally Visible/Invisible in Continuous View. What you can do is set the ForeColor/BackColor of the Control to the same color as the BackColor for the Detail Section of the Form, under whatever condition(s). And the Control is only really 'hidden' if its Border Style Property is set to Transparent, a look I've never thought was particularly pleasing.

Linq ;0)>
 
..., a look I've never thought was particularly pleasing.

Linq ;0)>
I agree too.

From what you've said and based on my interpretation, if you are hiding the whole record when one of it's field's is unchecked then you really should be filtering out these records in the query.
 
From what you've said and based on my interpretation, if you are hiding the whole record when one of it's field's is unchecked...
You've misinterpreted! The OP's talking about hiding certain Controls on some Records, not about hiding the entire Record.
...I need to rather view or hide certain controls based on other criteria, but only for those records and not all records.

Linq ;0)>
 
Last edited:
Ah, I see missinglinq.

In that case, if the controls don't have a border, another way would to be return Null if field1 is unchecked. That is, in your query, for field 2:
Code:
IIF([Field1]=0, Null, [Field2])
 
I had this issue and I think Galxiom introduced using Text box Controls as Command Buttons.

With Text Box Controls you can have them display according to needs of that record in a continous form.

With Formating they appear to a Command Buttonbut infact are a text box control.

If wish to persue this I can post further details.
 
Here it is anyway...

In this case a continous Form has records that may or not have a Mob Tel Num.

A Text Box Control has Control Source
Code:
=IIf([MemMob]='None',"No Mobile","SMS Payment Due")
Name is txtSendSMS

Conditional Formating Value = "No Mobile" is shaded ie if No Mobile is the control value the control is not enabled.

Special Effects is Raised and Border Stye is Solid.

maybe some other formating to suit but essentialy it resembles a raised command button and is only Enabled if the record has a mobile number.

The On Click event has code to run when the "Command Button" is Clicked.

Works very well.
 
using Conditial Formatting you can set controls as enabled/disabled for specific records. you can't hide the control.
you can also set the back color and the fore color of the control.

you can also use the OnCurrent event to set a control as enabled/disabled.
it will affect the control for all records, but the end user won't notice it
 
using Conditial Formatting you can set controls as enabled/disabled for specific records. you can't hide the control.
you can also set the back color and the fore color of the control.
Good point smig. I always forget that option.

you can also use the OnCurrent event to set a control as enabled/disabled.
it will affect the control for all records, but the end user won't notice it
Fyi it's a continuous form.
 
Fyi it's a continuous form.
I know, that's whay I said:
it will affect the control for all records
I also said:
the end user won't notice it :)

if you take the OnCurrent approach to enable/disable controls you must move the focus to enabled control before you try to disable it
 
...the end user won't notice it :)
Actually, using code in the OnCurrent event to set the Enabled Property to No most certainly will be noticed...unless you also set the Locked Property to Yes at the same time! Simply setting Enabled to No, by itself, grays out the Control, and on a Continuous Form that means all instances of the Control.

Linq ;0)>
 
Actually, using code in the OnCurrent event to set the Enabled Property to No most certainly will be noticed...unless you also set the Locked Property to Yes at the same time! Simply setting Enabled to No, by itself, grays out the Control, and on a Continuous Form that means all instances of the Control.

Linq ;0)>
Good point Linq :)
Forgot about that, though I mormaly set the Locked property.
 

Users who are viewing this thread

Back
Top Bottom