- Local time
- Today, 11:42
- Joined
- Feb 19, 2002
- Messages
- 45,768
True but this is a list of Authors, NOT a list of books. Therefore, you need to use ONLY the Authors to populate this form. There is a similar problem with the books subform but I didn't track it down.It's a many to many relationship so the bridge table ties it to the books
I see now, why you made this form this way but you did yourself NO favor with this reuse. A simpler solution than all the code might have been to populate the other subforms with a different query depending on which of the types was selected from the unbound combo. And in that code, populate the master/child links appropriately so that Access can take care of linking the subforms. I don't have any more time to look at this now but I did notice one other problem. I've posted a picture below so you can see it.
IMPORTANT
It's not your fault, it is a problem caused by an Access "feature" designed to help you but which will kick you when you're down if you do not fully understand how it works. This feature is "Name AutoCorrect" sometimes called by experts "Name AutoCorrupt" due to what it did to you in this situation. At some point in time, you decided to change qryBooks so you renamed it and rebuilt the query. HOWEVER, Access never knew it was your intention to replace the old version with a new version. It thought you just wanted to change the name of the query so it "helped" you. EVERY place in the database where you used qryBooks in a form/report/ or other query, Access replaced the name qryBooks with zzqryBooks. So, qryBooks is NOT being used in at least the form in this picture and who knows where else you might have a similar problem.
The solution to "Name AutoCorrect" is to just turn it off. If you want to rename objects and you want its help, then turn it on, make the changes, open every single object you think might have been impacted by the changes, then and only then turn off "Name AutoCorrect". Pay attention to that previous direction. The thing that gets people in trouble is assuming that the name propagation happens immediately. Well, it does not. The name propagation does not happen until the next time Access has to open the object that got changed. That is when Access recognizes there was a change and looks in its change log table to figure out what happened and than it fixes up the object it just opened. So, with this behavior in mind, you will see that if you don't open all the objects you changed, they might not get changed for weeks. Lots can happen in that time and multiple changes might stack up on each other causing great confusion. It is quite likely that this "feature" is responsible for certain types of database corruption when unapplied changes get stacked. Also, if you think you've opened all objects and so propagated all the changes, and turn off "Name AutoCorrect", if you missed an object, it will NEVER get fixed and it will remain broken.