G
gatarossi
Dear all
I have a VBA code in excel that do querys in my MS Access Database,
but I put a password in my database.
Then I have some dificult to inform the password in my vba code:
Sub del_cust_model()
Dim wrkSpace As DAO.Workspace
Dim db As DAO.Database
Dim qryDef As DAO.QueryDef
Dim qryNome As String
Dim strSQL As String
Dim strDB As String
'On Error Resume Next
strDB = ThisWorkbook.Path & "\bd_dynamic_query.mdb"
Set wrkSpace = Workspaces(0)
Set db = wrkSpace.OpenDatabase(strDB)
qryNome = "qryDelete"
db.QueryDefs.Delete qryNome
strSQL = "DELETE aux_cust_model.* FROM aux_cust_model "
Set qryDef = db.CreateQueryDef(qryNome, strSQL)
qryDef.Execute
End Sub
Where can I inform the password?
Thanks in advance!!!!
André.
I have a VBA code in excel that do querys in my MS Access Database,
but I put a password in my database.
Then I have some dificult to inform the password in my vba code:
Sub del_cust_model()
Dim wrkSpace As DAO.Workspace
Dim db As DAO.Database
Dim qryDef As DAO.QueryDef
Dim qryNome As String
Dim strSQL As String
Dim strDB As String
'On Error Resume Next
strDB = ThisWorkbook.Path & "\bd_dynamic_query.mdb"
Set wrkSpace = Workspaces(0)
Set db = wrkSpace.OpenDatabase(strDB)
qryNome = "qryDelete"
db.QueryDefs.Delete qryNome
strSQL = "DELETE aux_cust_model.* FROM aux_cust_model "
Set qryDef = db.CreateQueryDef(qryNome, strSQL)
qryDef.Execute
End Sub
Where can I inform the password?
Thanks in advance!!!!
André.