Dim cnn As ADODB.Connection Dim rst As ADODB.Recordset Dim cmd As ADODB.Command Dim strConnect As String Dim ACCOUNT_NUMBER As String strConnect = "provider=sqloledb;Server=RMDB5.campus.com;Database=SS_Pro;Uid=xxxx;Pwd=xxxx;" ' Instantiate the connection object Set cnn = New ADODB.Connection ' Open the connection based on the strConnect connect string arguments cnn.Open strConnect ' Instantiate the command object Set cmd = New ADODB.Command ACCOUNT_NUMBER = Me.SUPPLIER_LOOKUP ' Assign the connection and set applicable properties cmd.ActiveConnection = cnn cmd.CommandType = adCmdStoredProc cmd.CommandText = "sp_qsupp_LOOKUP" cmd.Parameters.Append cmd.CreateParameter("@Account", adVarChar, adParamInput, 10, ACCOUNT_NUMBER) Set rst = cmd.Execute Set rst = Nothing Set cnn = Nothing Set cmd = Nothing
|Can not see the SAVE AS option when opening Access 2016||4||16|
|employee anniv date with text field type||9||23|
|MS Access Replace Spaces In Title With Characters Like (-) Dashes In a New Field||16||26|
|DCount with multiple criteria||3||21|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
17 Experts available now in Live!