I need help. Why the type mismatch.
I copied the code from another of my programs and there is no error in the other program. tbl.name is a string.
Dim dbmath As Database
Dim rs As Recordset
Dim ws As Workspace
Set ws = DBEngine.Workspaces(0)
Set dbmath = ws.OpenDatabase(NuevaDB$ + ".mdb")
'next statement gives 'type mismatch' WHY?
Set rs = dbmath.OpenRecordset(tbl.Name, dbOpenDynaset)