Need help to prepare a vba code

%3CLINGO-SUB%20id%3D%22lingo-sub-1422715%22%20slang%3D%22en-US%22%3ENeed%20help%20to%20prepare%20a%20vba%20code%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1422715%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3EMS%20Access%20Database%20-%20ABC%3C%2FP%3E%3CP%3EQuery%20-%20Data%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ei%20just%20wanted%20to%20code%3C%2FP%3E%3CP%3Eto%20open%20the%20ABC%20database%20and%20click%20on%20query%20Data.%3C%2FP%3E%3CP%3Ewhen%20i%20open%20query%20it%20ask%20for%20servername%20%2C%20login%2C%20password%20(pass%20thru)%3C%2FP%3E%3CP%3EOnce%20parameter%20is%20updated%2C%20i%20get%20a%20view%20of%20table%20with%20data%3C%2FP%3E%3CP%3Ei%20just%20wanted%20to%20copy%20the%20data.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%20help%20me%20with%20the%20code%20as%20i%20tried%20but%20unable%20to%20go%20past%20the%20login%20password%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1422715%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAccess%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EAccess%20Web%20Database%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1424075%22%20slang%3D%22en-US%22%3ERe%3A%20Need%20help%20to%20prepare%20a%20vba%20code%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1424075%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F646497%22%20target%3D%22_blank%22%3E%40gilbert7%3C%2FA%3E%26nbsp%3BBased%20on%20your%20description%2C%20one%20assumes%20that%20this%20is%20an%20Access%20accdb%20linked%20to%20tables%20in%20SQL%20Server%2C%20SQL%20Azure%2C%20or%20perhaps%20another%20server-based%20database.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20all%20of%20those%20cases%2C%20you%20need%20to%20correct%20ODBC%20Driver%2C%20the%20name%20of%20the%20server%20on%20which%20the%20database%20resides%2C%20the%20name%20of%20the%20database%2C%20and%20a%20valid%20login%20and%20valid%20password.%20PLUS%20the%20owner%20of%20that%20database%20must%20have%20given%20you%20permissions%20to%20use%20it.%20One%20assumes%20that%2C%20if%20you%20have%20a%20valid%20login%20and%20password%2C%20the%20DBA%20has%20given%20you%20appropriate%20permissions.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhat%20part%20of%20this%20is%20failing%20for%20you%2C%20specifically%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

Hello,

MS Access Database - ABC

Query - Data

 

i just wanted to code

to open the ABC database and click on query Data.

when i open query it ask for servername , login, password (pass thru)

Once parameter is updated, i get a view of table with data

i just wanted to copy the data.

 

Please help me with the code as i tried but unable to go past the login password 

 

 

1 Reply

@gilbert7 Based on your description, one assumes that this is an Access accdb linked to tables in SQL Server, SQL Azure, or perhaps another server-based database.

 

In all of those cases, you need to correct ODBC Driver, the name of the server on which the database resides, the name of the database, and a valid login and valid password. PLUS the owner of that database must have given you permissions to use it. One assumes that, if you have a valid login and password, the DBA has given you appropriate permissions.

 

What part of this is failing for you, specifically?