'Observacao nao esqueca de colocar a referencia
'microsoft DAO no me Project Referencia
Option Explicit
Dim Localizar_Tabelas As String
Dim Wrk As Workspace
Dim DB As Database
Dim rs As Recordset
Function Localizar_Banco()
Localizar_Tabelas = "SistemasBancoDadosTabelas.mdb"
End Function
Private Sub Form_Load()
Desabilitar_Campos
Localizar_Banco
'abre banco de dados
Set Wrk = CreateWorkspace("ODBCWorkspace", "admin", "")
Set DB = OpenDatabase(Localizar_Tabelas)
Set rs = DB.OpenRecordset("Select * from Clientes order by 1", dbOpenDynaset)
End Function