Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hiding Things on Continuous Forms

Status
Not open for further replies.

ShaneBrennan

Programmer
May 19, 1999
198
GB
Say I have a table with 8 fields called F1 to F8 and I create a simple Continuous form to show these 8 fields.

Now say I wish to hide or disable the fields which contain no data - this is my problem.

If I hide a control on a form ALL occurances of that control is also hidden for all the records - but I wanna hide just the one - for that particular record.

The reason for this, is that I's creating a system for recording student grades for all the units they are tought.
each unit has a number of assessment criteria for Pass, Merit and Distinctions, but they are not always the same, e.g.
Unit1 may have P1,P2 and P3 whilst
Unit2 may have P1,P2,P3 and P4

Therefore I want to disable P4 on the row where the lecturer is required to enter the assessment criteria for Unit1.

I can do this type of thing with reports because there is a format event, but forms - now that seems to be another thing altogether.

Any help would be appreciated with this problemo

If I solve it, I'll post the code - cause I guess someone out there has the very same problem.

Thanks for any help in advance.

Shane Brennan - feeling a little happier now :)
Shane Brennan
Shane.Brennan@tcat.ac.uk

 
Hi Shane,

if you'd like to disable a control based on other control value, then

set the control (the one you want to disable)'s "Enable" property equals to "No"

then create a code on the criteria control_exit event for instance,

if criteriaCtl <> &quot;&quot; Then
P4.enabled = True
Else
P4.enabled = False
End if

Have a try!

Tin Tin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top