subform loading - blank form?

  • Thread starter Thread starter Brad Pears
  • Start date Start date
B

Brad Pears

I have a main form that contains subforms. On one of these sub forms, I
dynamically load other forms into it using the .sourceobject property.

In my code, when a user launches the application, I load the last form the
user happened to be on before they exited back into this "container" (if you
want to call it that...). However, when some of these subforms are loaded
(not all of them) using the .sourceobject property, it shows as a blank
form! If I move off that form by selecting an option that changes the
..sourceobject property and then select the option to display the original
form again, it displays fine!!!

I cannot figure out what may cause some forms to be loading this way and not
others... Do I need to be using a refresh or a delay or something like that
maybe in the subforms that I am having the problem with??

Has anyone ever seen this type of behaviour?

Thanks, Brad
 
When you set the SourceObject property of a subform control, Access has a
guess at what you might want in the LinkMasterFields and LinkChildFields
properties. If it guesses wrong, you get no records.

Check, and if necessary set, these properties after setting SourceObject.
 
Guess what?? I discovered something I didn;t notice earlier... The form
is actually displaying BUT when it loads, it was scrolled all the way down
to the bottom - hence it appeared to be blank! When I scrolled up - voila!!
Now I wonder what would make it do that!!! Is there a way to force it to
alwyas display at the top of the form?? Or, is there a command I can issue
to scroll up in the load event?

Thanks, Brad
 
Back
Top