Recent content by dougancil

  1. D

    SQL Connection string with VBA

    G37Sam, Seems that the best way to do what I'm needing is to link the two tables together (which I've never done before) and I found this code for doing so: DoCmd.TransferDatabase acLink, "ODBC Database", _ "ODBC;Driver={SQL Server};Server=xxxxx;Database=MDR;" _...
  2. D

    SQL Connection string with VBA

    G37Sam, I don't get a dropdown after I put the "." in ADODB. What do I have to do to add that library?
  3. D

    SQL Connection string with VBA

    I get an error on this line of code: Dim rs As ADODB.Recordset "User defined type not defined" and can you give me a good example of how to open a recordset properly with a sql connection string?
  4. D

    SQL Connection string with VBA

    Lagbolt, I've changed my code to this: Option Compare Database Private Sub Command2_Click() Dim batchid As String Dim cnn As String Set cnn = New ADODB.Connection cnn.Open "Provider=sqloledb;" & _ "Data Source=xxxxx;" & _ "Initial Catalog=xxxxx;" & _ "User...
  5. D

    SQL Connection string with VBA

    Lagbolt, Sorry I realize now that I worded that question incorrectly. What I'm trying to do is have the data that's in the access table (in my case the table is called 6_1_execupay) stored as a recordset so that i can post it to my sql table and update with the other procedures that I need to...
  6. D

    SQL Connection string with VBA

    Lagbolt, here's what I found on another forum for my connection string: Set cnn = New ADODB.Connection cnn.Open "Provider=sqloledb;" & _ "Data Source=xxxxx;" & _ "Initial Catalog=xxxxx;" & _ "User Id=xxxxx;" & _ "Password=xxxxx" I'm assuming that...
  7. D

    SQL Connection string with VBA

    I have an application that I'm trying to finish in VBA, and as I've never written in it, it's a bit challenging to me. I've written some in VB but the syntax isn't the same between the two for some things. Essentially, here's the logic (or lack of) that I'm trying to accomplish with this task...
  8. D

    Posting a dataset to a SQL table

    As it stands currently, I get an error of 2491. The action or method is invalid because the form or report isn't bound to a table or query. This is when I try to run Form1, and when I Debug that it takes me to this line of my code: DoCmd.OpenForm "Form1", acNormal, acEdit
  9. D

    Posting a dataset to a SQL table

    I have an application that I'm trying to do the following 3 things on. When a user presses a button, another form is opened with a Union Group giving the user 3 options (1, 2, or 3) and when the user submits their choice, the form is closed and: 1. A SQL table is appended with the dataset...
  10. D

    Creating and appending a table

    DJ, First, I'm not sure how to insert my dataset into my table. Secondly, I've created another form that is going to have the combo box, but I have no idea how to save what is picked in that form as appended data to the database. That would be the start of this. Thank you Doug
  11. D

    Creating and appending a table

    I am relatively new to VBA (I have dabbled some in VB) and I'm trying to do a few things: 1. When a user presses a button, the dataset that is created is appended to an existing database called "Payroll" 2. When the user presses that same button, they are given a combo box that asks them what...
Back
Top Bottom