Hi, I have a macro that produces a report that uses a number of queries to populate summary data on p1 and detail data on each of the following pages.
I recently split the database and now, when the macro is run, it stops 3 times with a 'Cannot open any more databases' prompt. On clicking OK, the report continues, but when it is finished, there are 3 subreport 'boxes' or sections that are blank on the summary page - no labels or data are printed at all.
Being somewhat new to access I don't know the best way to fix this. My thoughts so far:
1) Move the macro to the back end. Given that it worked before I split the database, I'm assuming the connection is the problem and so if I put the macro in the backend where the tables are, it will work as before. Is this correct if so, how do I move the macro?
2) Increase the maximum number of databases that can be opened at one time. (I'm working on the theory that some MS programmer once said 'nobody's ever going to need more than 640kb of databases open' or similar). I cannot find this property in Tools/Options, so it may be a faint hope, but can someone confirm this?
3) Web searches seem to indicate combo-boxes can be a culprit of this error message, depending on rowsource values. The macro doesn't use combo boxes, but if looking up data in other tables in where clauses has the same effect, this may make sense. Is there something I can do to test this?
4) (The most realistic presumption, imho) Somewhere the macro is opening new databases where it should be using databases already open. Either that, or the databases should be closed when they are finished with. (I'm guessing - given that we only have one database - that the error message is actually referring to connections or table handles rather than actual databases.) How would I go through and find if this is the case?
tia for any help
I recently split the database and now, when the macro is run, it stops 3 times with a 'Cannot open any more databases' prompt. On clicking OK, the report continues, but when it is finished, there are 3 subreport 'boxes' or sections that are blank on the summary page - no labels or data are printed at all.
Being somewhat new to access I don't know the best way to fix this. My thoughts so far:
1) Move the macro to the back end. Given that it worked before I split the database, I'm assuming the connection is the problem and so if I put the macro in the backend where the tables are, it will work as before. Is this correct if so, how do I move the macro?
2) Increase the maximum number of databases that can be opened at one time. (I'm working on the theory that some MS programmer once said 'nobody's ever going to need more than 640kb of databases open' or similar). I cannot find this property in Tools/Options, so it may be a faint hope, but can someone confirm this?
3) Web searches seem to indicate combo-boxes can be a culprit of this error message, depending on rowsource values. The macro doesn't use combo boxes, but if looking up data in other tables in where clauses has the same effect, this may make sense. Is there something I can do to test this?
4) (The most realistic presumption, imho) Somewhere the macro is opening new databases where it should be using databases already open. Either that, or the databases should be closed when they are finished with. (I'm guessing - given that we only have one database - that the error message is actually referring to connections or table handles rather than actual databases.) How would I go through and find if this is the case?
tia for any help