I have posted before about forms getting confused about which database they were attached to, and been told it couldn’t happen - but I’m sure it does. This is the proof:
This form is created in my ‘active’ database, but for some reason it thinks its displaying my ‘main’ database. The data that is being displayed correctly is for the fields that exist in both databases, but the data that is being said not to exist, is for the fields that relate to the ‘active’ database, but don’t exist in the ‘main’ database. If I create a new Text Editor object on this form, the fields it offers to display as ‘data’ are the fields in my ‘main’ database, even though the form is in the ‘active’ database.
The way I was able to fix this last time it was happening, was to reference the database as well as the form when I changed forms. It has been unmasked again now when I have changed my code to use the ‘goform’ code, as suggested by Jim to rectify the other problem I was having with my forms. The ‘goform’ code doesn’t support the database reference according to the help files. Initially I left it in, because the programme didn’t give an error message, but I started seeing the problem I am describing now. I’ve now tried to change to ‘goform’ when I am not changing databases, and ‘open form’ when I am changing databases. I seem to have partially, but not completely, rectified the problem. (Just to mention, previously when the databases were confusing forms, I would receive an error message saying the form didn’t exist. Now, I’m not seeing an error message, just a form that wants to display the wrong data!!).