A family of Microsoft relational database management systems designed for ease of use.
Okay, the problem is solved. Thank you for your time and advice!
The tables were no longer linked and some code in the startup form literally blew its Stack looking for a data column.
Feel free to test this yourself and post it wherever it might do some good. And, remember, an Out Of Stack space error can be caused by unlinked tables.
So this is what I put in the Startup form's On Open event:
'‘ Procedure: RefreshTableLinks_MultiDB
'‘ Purpose: Refresh table links to one or more backends
'‘ 2018 by Kent Hartland. Feel free to use it
'‘—————————————————————————-
Public Function RefreshTableLinks_MultiDB() As Boolean
On Error GoTo PROC_LINK_ERR
Dim db As DAO.Database
Dim tdf As DAO.TableDef
Dim rst As DAO.Recordset
Dim strConDB1 As String
Dim strConGroupDatDB2 As String
Dim strTblName As String
'170 pstrDbPwd1 = "(Your first db password) UNCOMMENT this line if needed"
'170 pstrDbPwd2 = "(Your second db password) UNCOMMENT this line if needed"
180 Set db = CurrentDb
190 strSQL = "SELECT * FROM tbl_(Whatever);" ' tbl_(Whatever) is the last table in the tables list that should always have data in it (VERIFY THIS!) or create a dummy table for this with a record in it. So, record count not greater than 0 means it is empty or not linked
200 Set rst = db.OpenRecordset(strSQL, dbOpenDynaset)
210 With rst
220 If .RecordCount > 0 Then
RefreshTableLinks = False ' no need to refresh links
230 GoTo PROC_EXIT
240 Else
RefreshTableLinks = True 'need to refresh links
250 GoTo PROC_LINK_ERR
260 End If
261 .Close
262 End With
PROC_RELINK:
On Error GoTo PROC_ERR ' notice that, inside the Relink procedure, we switch error handlers
263 MsgBox ("Cannot find (DB1). Click OK and use the File Explorer to locate '(DB1 name)'")
264 strConDB1 = GetOpenFile(pstrDBDrive, "Locate '(DB1 name)'") ' or add ",PASSWORD=" & pstrDBPwd1 if the database has a password
265 MsgBox ("Now click OK and use the File Explorer to locate '(DB2 name)'")
266 strConDB2 = GetOpenFile(pstrDBDrive, "Locate '(DB2 name)'") ' or add ",PASSWORD=" & pstrDBPwd2 if the database has a password
267 For Each tdf In db.TableDefs
270 strTblName = tdf.Name
280 If Len(tdf.Connect) > 0 Then
290 Select Case strTblName 'make sure it is not a System table or local table...
Case "db1_tbl_1", "db1_tbl_2", "db1_tbl_5", 'etc, all the table on DB1
300 tdf.Connect = ";DATABASE=" & strConDB1
310 tdf.RefreshLink
320 Case "db2_tbl_1", "db2_tbl_2", 'etc - all the tables on the second database
330 tdf.Connect = ";DATABASE=" & strConDB2
340 tdf.RefreshLink
350 End Select
360 End If
370 On Error Resume Next
380 Next tdf
390 RefreshTableLinks_MultiDB = False '"false" meaning there is no more need to relink the tables now
400 GoTo PROC_EXIT
PROC_LINK_ERR:
410 Err = 0
420 GoTo Proc_ReLink
PROC_EXIT:
430 Exit Function
PROC_ERR:
440 pstrErrResult = FuncLogErr(Err.Number, Err.Description & " Line Number: " & Erl, "RefreshTableLinks_MultiDB")
End Function