|
|
Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Hi,
I have set a password on my backend DB.
In my FrontEnd DB I call a table with the following code : Dim dbs As Database, rst As Recordset Set dbs = CurrentDb() Set rst = Openseek("Table") With rst rst.Index = "ID" rst.Seek "=", Forms!XXXX!ID
this code calls the following function to connect the table.
Public Function openseek(table) As Recordset Dim db As Database, tbl As TableDef, dbspad, sourcetabel Set db = CurrentDb() dbspad = Mid(db(table).Connect, InStr(1, db(table).Connect, "=") + 1) If dbspad = "" Then Set openseek = db.OpenRecordset(table, dbOpenTable) Exit Function End If sourcetabel = db(table).SourceTableName Set db = DBEngine(0).OpenDatabase(dbspad) Set openseek = db.OpenRecordset(sourcetabel, dbOpenTable) End Function
I have already deleted the links and recreated them but I get allways a run-time error 3055 (Not a valid file name) on the intruction "Set db = DBEngine(0).OpenDatabase(dbspad)".
What do I wrong?
Tx in advance -- Michel
|
|
|