Access VBADiscuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
I have a database that has an ODBC connection to an external database in another program. The problem is when you open the database you have to log into MSDE each time.I want it to automatically log into MSDE when I open the database through the startup message screen. On the startup screen I have the following module defined:
Private Sub Form_Load()
Dim Myserver As Usercontrol
Set Myserver = MSSQLServer
Myserver.Connect "servername", "username", "password"
End Sub
I get the error "user type not defined" and I need help to get it to work. Any ideas as to what to do? I am new to this and it really is bugging me.
While I don't recognize some of the objetcs you're declaring here, you might simply consider using Windows authentication on a trusted connection, instead of requiring a second login using standard MSDE security.