Is it possible in VBA to “Hijack” the ODBC dialog and use my own form?
I want my users to use my form and pass the info to Access/ODBC before the dialog pops up.
My project builds the SQL then I do
And it calls this code, but it does not seem to work. Am I missing something?
My form captures the UserID and Password to send for multiple updates. The ID goes to a history file and the Password is zapped.
Alan
I want my users to use my form and pass the info to Access/ODBC before the dialog pops up.
My project builds the SQL then I do
Code:
varStatus = SysCmd(acSysCmdSetStatus, strStatus) 'Update
ConnectionsEtc
DoCmd.RunSQL MakeQuesReslt 'Updates UNIQUE ids
Code:
Public Sub ConnectionsEtc()
'ODBC connection String
Dim conN As ADODB.Connection
Dim ConnectionStringer As String
Set conN = New ADODB.Connection
ConnectionStringer = "ODBC;DATABASE=HSDBCS00;UID=" & gbl_DUserID & _
";PWD=" & gbl_Pswrd & ";DSN=SHDBCS00"
conN.ConnectionString = ConnectionStringer
conN.Open
Set conN = Nothing
End Sub
Alan