Open Table and provide ODBC Connect String

K

Kirk P.

I've got this code that opens a table and finds the first record. This is a
linked ODBC table, so it prompts you for a UserID and PW.

How do I include the UserID and PW in the code so I don't have to type it in
every time?

Public Sub macOpenPost_Log()

DoCmd.OpenTable "MyTable", acViewNormal, acEdit
DoCmd.GoToRecord acTable, "MyTable", acFirst
DoCmd.Close acTable, "MyTable"

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top