On 16/01/2011 19:47:34, "Phil" wrote:
Quote:
I have a database "Master Prog.AccDb" which sets a reference to another
database "Menu.AccDb" - bit like the old Switchboard system. Within
Menu.AccDb there are forms called "CoInfo", "Commands", "Icons",
"MenuSetUp" and "SetUpReferences" All open as expected other than
"SetUpReferences" which gives a 2501 error. Normally there are no tables
in the "Menu" database, the neccessary tables are linked to the Master
database. If however I link the appropriate tables to the Menu Db the
"SetUpRefs" form works correctly. I have decompiled and created a new Menu
Db. Any bright ideas please Phil |
Solved it.
The form had a recordset, which of course it couldn't find as the tables are
held in the calling Db. ( It should have been blank) Fact that the recordset
is created dynamically on the OnOpen event doesn't seem to matter, presumably
Access "examines" the form first before it runs the OnOpen event. Phil