G
gatarossi
Dear all,
I need to put the password of my ms access database in this code
below, but I don't know where.
This is a query to delete some data in ms access, that I run it in
excel.
Could anybody help me?
Thanks a lot!!!!
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
I need to put the password of my ms access database in this code
below, but I don't know where.
This is a query to delete some data in ms access, that I run it in
excel.
Could anybody help me?
Thanks a lot!!!!
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