Subform opening twice?

Oimoi

Registered User.
Local time
Today, 09:16
Joined
Jul 17, 2011
Messages
42
Let's say I have a form with a subform on it. Whenever I click to open the form from the navigation pane, it pulls up the form with the subform AND the subform again in a separate tab. Is there any way to prevent this? Otherwise, I want the subform to just open once on the main form, instead of popping up in another tab.

I tried changing the Tabbed Documents setting under Current Database settings, but that's not what I'm shooting for. I don't mind the tabs - just extraneous ones that might seem cluttered or confusing! I feel like I'm missing something terribly simple, as I couldn't find anyone with a similar "problem" in my search.

I'd appreciate any insight at all.
 
Let's say I have a form with a subform on it. Whenever I click to open the form from the navigation pane, it pulls up the form with the subform AND the subform again in a separate tab. Is there any way to prevent this? Otherwise, I want the subform to just open once on the main form, instead of popping up in another tab.
I don't see how this is possible without you creating the subform in the tab as well. Do you have two subforms?
 
Thanks for responding! And, oh boy. I think I see my problem now. (Maybe?)

My form actually has two subforms on it, and only one of them has this issue of popping up. The difference is I created one using an existing form (which is the one opening in a new tab), and another using a table (which is not). Is this the source of my problem?

I hope this makes sense. *not the most tech-savvy person in the world*
 
Problem solved! And I feel absolutely ridiculous.

Dug around my coding and found this under the "On Load" event:

DoCmd.OpenForm "FormName"
DoCmd.GoToRecord acDataForm, "FormName", acNewRec

My intention was to have the subform open to a new record, but the first line was also opening the subform AGAIN. Apologies for taking up your time. Next time I run into a problem, I'll shuffle through my "coding" first before I take to the search engines and forums.
 
That's fine. Sometimes you just need a nudge in the right direction.

I'm glad it's sorted.
 

Users who are viewing this thread

Back
Top Bottom