I am using Access 2007 and i am trying to connect to sql server 2000 from a form in access 2007. I havent done this before, after some search i tried this code, can you advise me if it is correct:
Dim myCMD As SqlCommand
myCMD = "select count(n0_period_no) from plu"
Text1.Text = myCMD
First of all i want to get an input from the program that the connection succeded, that is why i run this query and i want to display the result in the textox...
I finally managed to make a connection from Access 2007 form to Sql Server 2000. I am trying to run a simple query to see the result in a textbox, but i get the following error. In the SQL database the field n0_department_no is decimal (5 lenght).
The code is below any help is appreciated
Dim ad As adodb.Connection
Set ad = New adodb.Connection