I have a report that I export from Access to Excel. Before I do that I need to generate a query in Access that have a connection with an Informix database. When I ask to run the query a pop up ask for login/password.
How can I automate this?
Or how can I create a string connection so when I run the query the connection with the server is already stabilish?

I tried this:

Private Sub testConection()
Dim cn As New ADODB.Connection

DoCmd.SetWarnings False

Set cn = New ADODB.Connection

cn.ConnectionString = "DRIVER={OpenLink Generic 32 Bit Driver v4.0};DNS=CMS;_ServerType=Informix 2000;Host=;Port=5000;Database=;FetchBuf ferSize=30;NoLoginBox=No;Proto
col=TCP/IP;ReadOnly=No;ServerOptions=;DeferLongFetch=Yes;T ABLE=root_hsplit;Uid=***user**

DoCmd.OpenQuery "01 - Criar base skill", acViewNormal, acRead


End Sub

The Access file open without password, the password is asked when I call the query.