The "disappearing" subform

B

BRMorgan

Anyone have an idea on this one? I created an Access 2003 (SP3 + hotfixes)
form with a subform. On my machine it works fine. Both load initially and
all is right with the world. BTW, I'm running XP SP2. When I run it on an
identical machine (same model, same os, Access 2003 - same SPs & hotfixes on
both) the subform does NOT load initially. This causes as AfterUpdate event
error because I reference the subform in the AfterUpdate of a combo box on
the Parent form.

Here's what I've tried:
- I did have 2003 & 2007 installed on mine. Removed both, including all
Registry references & did a clean install of 2003. Even without the SP &
hotfixes it would NOT error on mine.

- Recreated both the form & the subform from scratch - took a long time, but
I did not even cut & paste code just to be sure. No dice.

- Created a new blank project with only the data, form & subform. Nada.

- Reinstalled 2003, SPs & Hotfixes on the other machine - ARGH!!

No mater what I do I cannot make it fail on mine & cannot make it work on
the other machine (actually its 10 other user machines it won't work on). Oh
- if I open the form in design mode on one of the failing machines THEN run
it - voila - success. Happens with both the mde & mdb versions.

I'd apreciate any insight or suggestions - at the end of my rope - and that
NO April Fools! :)
 
G

golfinray

Is there data in the subform? If there is no data to display it will do that.
Also, do you have the master child link set between the mainform and subform?
Is this a one-to-many? The subform needs to be the many side. That is, the
primary key of the mainform table is a foreign key in the subform table.
 
B

BRMorgan

golinray,

Thanks for responding.

There is data in both the parent & child forms on the load. It is a one -
many with the one being in the parent form & the many being in the child.
And yes, I have checked my link set. (But I have been know to get in a hurry
& that one wrong - great suggestion) Also should have mentioned that the
subform is in continuous view.

The frustrating thing is I have created quite a few forms like this & never
had this problem (I have made a successful living programming in multiple
languages for 15+years). What's driving me nuts is that it works on my
machine at the start & will work after displaying it in design mode on the
others. I've also tried putting delays in the load of both (having
experenced Microsoft's tendancy to get ahead of itsself sometimes) - no
luck. Really wish I could use something else, but the client INSISTS on
Access 2003.

All I can figure is that there is some other install that has put a newer
..ocx or .dll on mine that is handling it. Did find out I'm running Lotus 8
while they are running 7; that seems to be the only difference. I also
loaded Lotus 8 & Office 2007 on one of the problem machines then removed it -
guess what...now it works!

Now I have to figure out what files changed. Hopefully that will point me in
the right direction.
 
T

Tom van Stiphout

On Thu, 1 Apr 2010 09:04:01 -0700, BRMorgan

A few ideas, mostly to collect more information:
* Create new database and use the form wizard to create the bare
minimum form and subform ON THE FAILING MACHINE. Drop the subform on
the form and have the wizard complete the association. Does it work?
* Does the subform work if opened by itself?
* You do have a split database, right?
* There are no error messages, right?
* Are there international issues at play here?

-Tom.
Microsoft Access MVP
 
B

BRMorgan

Tom,
Thanks for your help. I did try your suggestions w/ the following results:
Create new database and use the form wizard to create the bare minimum form and subform ON THE FAILING MACHINE. Drop the subform on the form and have the wizard complete the association. Does it work?
---It did not. Also stripped EVERYTHING from the existing db except the
bare neccessities - same results.
Does the subform work if opened by itself? ---Yes

You do have a split database, right? ---Yes

There are no error messages, right? ---Yes

Are there international issues at play here?
---No

While trying your suggestion about a "bare bones" attempt, I got a light
bulb! I removed the linking between Parent & Child and made the child
invisible. In the load event of the parent, I coded the desired filter,
requeried the subform, and made the subform visible. This actually worked
better, b/c the client added another criteriea (the ability to filter the
subform by a group of expired dates - ex. 30 days out, 90 days out, etc).

Who knows why the original way worked on some machines and not others, but
at least I can roll this out. Then I'll have time to ponder it more.

Thanks to you & golfinray for offering suggestions. I'm alone here &
sometimes it just takes "talking" it out & getting ideas from others to find
that "Ah-Ha" moment.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top