Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connect to SQL Server 2000 during Form Load

Status
Not open for further replies.

LonnieJohnson

Programmer
Apr 16, 2001
2,628
US
I am using Access 97 and wish to dynamically connect to an SQL Server database and table as a record source to my form when it opens. How can this be done?

Anxiously awaiting... lonniejohnson@prodev.com
ProDev, MS Access Applications B-) ,
May God blow your mind with His Glory in 2003.
 
Well,

The proper way would be to use an unbound form and use ADO. But since you'd have to load MDAC 2.1 or greater on every machine in order to use ADO with Access 97, I guess you could go with DAO in this case. The other, simpler technique is to use ODBC and link the SQL Server table directly into Access, which will let you use the table just like any other linked table. Which way do you want to go? Kyle
 
I think I'd like to go with the DAO unbound form. There is one SQL database in particular I want them to link to. Here I could supply the userid and password for the db.

Thanks for any help you can provide. lonniejohnson@prodev.com
ProDev, MS Access Applications B-) ,
May God blow your mind with His Glory in 2003.
 
The book "Access cookbook" by Ken Getz in chapter 14 tell you everything.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top