Changing subform source object causing problems

Gaffer

Registered User.
Local time
Today, 20:53
Joined
Nov 6, 2000
Messages
11
I'm trying to change a database that consists of a sequence of subforms held individually within different tabs on a subform. There seems to be a bit too much going on, so I've decided to leave the subforms unbound, and set them when the appropriate tab is selected, and unset them when the tab is changed. For most of the subforms, this works fine...

However! There's always an exception!!!

On one of them, when I set the sourceobject, it automatically populates the linkchildfields and linkmasterfields properties with an inexplicably crazy number of fields, most of which aren't even on the forms in question. I've tried to get around this by setting linkchildfields and linkmasterfields after changing the sourceobject. This does not work!

The first thing that happens is it returns error 2335 (relating to an imbalance between the number of fields) when I set linkchildfields. I try to get around this by trapping and resuming to the next step so it sets linkmasterfields and restores the balance, but, despite the fact that the linkchildfields and linkmasterfields are showing the correct fields, the form acts as if it has been bound with the screwy list of fields, and starts asking for fieldnames which are on neither form as parameters. When I hit cancel the subform control is empty.

I'm at a loss as to what the problem is or how I should sort it out! Any suggestions gratefully received.
 
Last edited:
I have been there and won the tee-shirt and wore the hat. When it happened to me was when I either delete a control or changed its' name, I don't remember which. To make a long story short, I accidently discovered it in a reports GroupBy, under the old name. So there using find to first search the entire Dbase for one of the names that is poping up. Then check all of the reports, esp[ecially the GroupBy and last check all of the querries. Somewhere in the you should find the name that you are looking for. Good luck, I hope that find finds them for you. hth.
 
Thanks for that. It's a lot of looking so I'll give it a try and see if I get any joy. At the moment, I've fudged it by leaving the subform continually bound, but it happily removes and resets the other objects. It's not the 100% solution I was looking for but at least it's sort of working, and helped out on some of the "weird crashing issues" I was having that got me looking at doing this in the first place!

Cheers for the suggestion.
 

Users who are viewing this thread

Back
Top Bottom