visibility problems cont

leerlap

Registered User.
Local time
Today, 05:19
Joined
May 4, 2003
Messages
22
llkhoutx - i've now put the same code:

Select Case Me!Frame6
Case 1
Me!field1.Visible = True
Me!field2.Visible = False
Case 2
Me!field1.Visible = False
Me!field2.Visible = True
End Select

in both AfterUpdate and Form_Current and this seems to work (is this what you meant??). However, when i go to a new record, it only shows the fields of the previous record - i can click select1 or select2 and it will show the proper fields, but i want it to show everything until i make my selection.

indesisiv - you've really lost me - seems too complicated and not sure worth the effort to do it this way - any way to simplify it?

Thanks again...lee
 
For this case you are probably right .. what i would do is.

Set the default value of the frame to null

then use:

Select Case Me!Frame6
Case 1
Me!field1.Visible = True
Me!field2.Visible = False
Case 2
Me!field1.Visible = False
Me!field2.Visible = True
case else
Me!field1.Visible = True
Me!field2.Visible = True
End Select


Hope that helps
Steve
 
Visibility Fixed!

Steve - this worked perfect - thanks. I noticed I do need to put the same code in both AfterUpdate and OnCurrent. Is there a good reason why? Is it that the code in AfterUpdate sets the frame for new records and OnCurrent maintains the old ones? Again, thanks for your help...lee
 
The afterupdate code fires when the frame value is updated ie when you click on it ...

Thu current record fires when you go on to a new record.

You do not actually have to put the whole code in both.

I would just put it in the after update: Then in the form_current put

call frame_afterupdate

or whatever the frame is called

That way you do not need to type the code in twice.

Steve
 
It's better to have the code in the Form_Current event and just call it on the after update event
Call Form_Current or just Form_Current
 
thanks

Thanks - works great - appreciate all the help.
Lee
 

Users who are viewing this thread

Back
Top Bottom