ok, I figured part of it out, the tableExists function returns a false
positive...
I don't understand why, but I rewrote it so now it works
> Function TableExists(sTableName As String) As Boolean
> Dim oTestTbl As Table
> On Error Resume Next
'I have no idea why this doesn't throw an error inside this function but the
same line does throw an error in the calling proc.
> Set oTestTbl = Me.Tables.Item(sTableName)
> If Not Err Then
> Set oTestTbl = Nothing
[quoted text clipped - 3 lines]
> On Error GoTo 0
> End Function
so I rewrote it thus:
Function TableExists(sTableName As String) As Boolean
Dim oTbl As Table
For Each oTbl In Me.Tables
If UCase(oTbl.Name) = UCase(sTableName) Then
TableExists = True
Exit For
End If
Next oTbl
End Function
which seems incredibly lame way to do it but it works so I guess that's what
counts.