G
Glenn
to reiterate an earlier question from Jeff in this group:
From code, is it possible to get the current users password?
My need/purpose:
from Access,
I open an Excel template with CreateObject("Excel.Application").
and fill that excel file with data from the access database by opening
an ODBC connection back to the database and use a query (querytables)
Until now the application ran without security. From Now on, the access
database is secured and so now, I need to add the user and his password
to the connection string.
'example from excel-help
Dim qt As QueryTable
sqlstring = "select 96Sales.totals from 96Sales where profit < 5"
connstring = _
"ODBC;DSN=96SalesData;UID=Rep21;PWD=NUyHwYQI;Database=96Sales"
With ActiveSheet.QueryTables.Add(Connection:=connstring, _
Destination:=Range("B1"), Sql:=sqlstring)
.Refresh
End With
best regards
glenn
From code, is it possible to get the current users password?
My need/purpose:
from Access,
I open an Excel template with CreateObject("Excel.Application").
and fill that excel file with data from the access database by opening
an ODBC connection back to the database and use a query (querytables)
Until now the application ran without security. From Now on, the access
database is secured and so now, I need to add the user and his password
to the connection string.
'example from excel-help
Dim qt As QueryTable
sqlstring = "select 96Sales.totals from 96Sales where profit < 5"
connstring = _
"ODBC;DSN=96SalesData;UID=Rep21;PWD=NUyHwYQI;Database=96Sales"
With ActiveSheet.QueryTables.Add(Connection:=connstring, _
Destination:=Range("B1"), Sql:=sqlstring)
.Refresh
End With
best regards
glenn