Subforms show through tab control in Access 2000

  • Thread starter Thread starter Michael Edwards
  • Start date Start date
M

Michael Edwards

This is a wierd problem, I have a form in Access 2000 with a tab control.

Page 1 of the tab control has 5 subforms, 4 of which have the SourceObject
property reset in code on the first subform's Form_Load event. I've done
this as noted in articles pertaining to how the form loading order of Access
subforms is unpredictable as the form is altered and saved.

The wierd thing is that as I go to any other tab (page), the 4 subforms
mentioned above show thru the tab pages (Page 2, Page 3 etc.) as if the tab
pages are transparent, and I can actually input data into the subforms.

Has anyone heard of this? and is there a work around?
 
Hi Mike,

It sounds like the subforms may not be contained in the
tab control. When you initially placed these on the
form, do you remember if the tab control was shaded when
you placed these subforms? I have accidentally pasted
objects into the tab control area incorrectly in the
past, and the object just sits on top of the tab control,
so it is visible regardless of what page is selected.
This sounds like it may be what you are experiencing.

To test this, you could cut one of the subforms, then
click on the tab for the page that you want to contain
the subform (you should see the handles appear) and click
paste. Then, move it to where you want it and view the
form.

Post back if that's not the problem, maybe someone else
will have some other ideas.

-Ted
 
Thanks for the advice, but that isn't the problem.

I did what you suggested and the subform still shows through.
 
I recreated the form clean. It does the same thing.

I then commented out the code that resets the SourceObject property for the
subforms that show through and the tab control work correctly. For now, it
will work until the subform load order changes again. I hope to find an
answer before I have to reactivate the SourceObject property code. I can't
be the first person to discover this issue.
 
Michael Edwards said:
Thanks for the advice, but that isn't the problem.

I did what you suggested and the subform still shows through.

Try a simple test. In design view of the form drag the TabControl to a new
location. Did the subforms also move? If not then they are NOT actually
on the TabPages at all and are simple "in front of" the entire TabControl.
In that case you need to Cut them to the clipboard, select the desired
TabPage and then Paste.
 
Back
Top