vba - Connecting an Access form to a SQL Server -


I am working on a project which is close by, but this last part is causing me some headache Because I have never done this before and it is having a hard time finding a research to help me go. I do not know that even the project is going to start as follows: (This email from my boss Is the reference)

You can connectivity using VBA Investigations need to. The server you connect to is HRLARNED. I have an access form, I will send you the connection information in that macros, where I did something similar. The difference is that my program is directly linked to the server. You will need to write in the local table, make a check for connectivity when the access file opens or every few minutes or something else, if the check reads that connection, then Remote server table from local server table, then shorten the local table

I'm really stuck and I'm running away from the options so that the beginners Thank you Hon's can be. = "Post-Text" itemprop = "text">

Try something like this to check the connection:

  Public Sub-Test Connection () Dim CNN as ADODB . Connection can be connected as Dial Bullion Set Cnn = New ADODB.Connection cnn.Provider = "sqloledb" cnn.Open "Data Source = HRLearnDev; Initial Catalog = YourTableName; UserID = userID; Password = 'Password';" If cnn.state = adStateOpen then Canconnect = True cnn.Close End if MsgBox "Can you connect?" & Amp; Honestly, this is clearly a homework problem and I do not think it would be the right thing to give you the full answer, but you should start it. 


Comments