subform visible after main form

Trevor Howard

Registered User.
Local time
Today, 23:34
Joined
Aug 29, 2002
Messages
64
I would like my subform to become visible once a couple fields on the main form have been filled in. I want to prevent data being entered into the sub form without the main form being populated.

Any help would be appreciated. Thanks!
 
Set the subform control's Visible property to No in design view. Then, in the after update event of the appropriate main form control, set it to visible (you can test the value entered if desired).
 
Hi Paul,
Thanks for that. What I ideally want to do is make the subform visible after three of my required fields on the main form have been completed. Is this possible?
 
Sure; if you can count on them being filled out in order, put code in the after update event of the third. Test that all three have valid entries and make the subform visible.
 
Sure; if you can count on them being filled out in order, put code in the after update event of the third. Test that all three have valid entries and make the subform visible.

Or just create a validation function in the form's module to check for all three filled in and then call that same module from each control's after update event. Then it doesn't matter in which order they are filled out.
 
That's what I would have suggested if the order couldn't be counted on. If it can, I wouldn't use the function, to avoid calling it the extra two times.
 

Users who are viewing this thread

Back
Top Bottom