Remember visibility settings between records

ForcedToUseIt

Registered User.
Local time
Today, 06:50
Joined
Jul 25, 2004
Messages
34
Hi all,

I have a form in my .mdb that has several subforms that I control the visibility of by pushbuttons. The pushbuttons (and the visibility of my subforms) should be remembered in some way for every record so that when I go between records, the pushbuttons and visibility should change according to my previously selected pushbuttons.

Here is an example:

I have 2 records A and B. On record A I push button no. 1 so that subform 1 will only be displayed. Then I go to record B and push button no. 3 so that subform 3 will only be displayed.
Now when I go back to record A, button no. 3 is selected and subform 3 is displayed.

Is there any way to nail this down?

Any help would be greatly appreciated.
 
You'd need to store somewhere, for each record, that these are visible/hidden.

Then you would put some code into the Form's Current event to test and act accordingly.
 
Do you mean that I need to create fields in the underlying table of the main form that store the visibility settings for each subfrom?

There must be an easier way to accomplish this. There must be a workaround so that I don't have to change the structure of my tables. Atleast I would think so.

Any ideas?
 
Is there some kind of logic in the data that the form stores that could drive the form set up? Example:

fld x: if null, turn off textbox x and text box y, if not null, turn them on.

???
kh
 
Yes there are two option boxes that control the visibility of several forms and I store the values of the option boxes in the underlying table for the main form. That's it.

I'm hoping that that is enough to accomplish this.
 
You might be able to use the form's OnCurrent event to check these flds and turn stuff on and off based what they contain.

kh
 
Sorry guy. Your explanation is not logical, or else people would be glad to help.

It does seem to be a Case Select or If Then ... Else If .... situation.
 
Thanks, Ken

I had the code to control this in the Form Open event only. Forgot about the Form Current event.

Works fine now. Thanks
 

Users who are viewing this thread

Back
Top Bottom