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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. jonsan

    Collecting data from Access DB with VBA

    Can complex conditional statements be made in a SQL query? Here is a more detailed explanation of what I need to accomplish. There are two columns important to the query (A and B). If multiple records have the same value for A, then their B values are relevant. B ranges from 1 to 6. If...
  2. jonsan

    Collecting data from Access DB with VBA

    It would be a simple query, except that I need to eliminate some of the data based on a value. I need to pull from three tables, and in each of these tables is Column A. I need to write code to evaluate the data in Column A, and then delete certain rows that have matching values in Column B...
  3. jonsan

    Collecting data from Access DB with VBA

    The information will be sent either to Excel or to Outlook (depening on what the user selects), but I would like to gather the data into a single recordset. Jon
  4. jonsan

    Collecting data from Access DB with VBA

    Can I add data to an existing recordset as I Select information from the different tables? Jon
  5. jonsan

    Collecting data from Access DB with VBA

    I am writing a script in VBA which will gather data from multiple Access tables and store them in a single recordset to be transferred to Outlook or Excel. I am using ADO objects. How do I append more data to a recordset? Thank you, Jon
  6. jonsan

    VBA Excel Module opening Access DB with Recordset

    Here is the connection string: "Provider=Microsoft.Jet.OLEDB.4.0;Data Source='\\path\files\folder\database.mdb'" I use this path succesfully to execute SQL statements with a ADODB Connection object in a different Macro. Thanks, Jon
  7. jonsan

    VBA Excel Module opening Access DB with Recordset

    Dim cConn As ADODB.Connection Dim rs As ADODB.Recordset Dim sSql As String sSql = "SELECT Table1.Field1,Table1.Field2, Table1.Field3 FROM Table1 WHERE Table1.Field4 = Yes" Set cConn = New ADODB.Connection Set rs = New ADODB.Recordset cConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data...
  8. jonsan

    Need help with an SQL Update

    Thanks PH! Can more than one field be used for the join? So can I set up something like this: UPDATE Table1 INNER JOIN Table2 ON (Table1.FieldY = Table2.FieldY) AND (Table1.FieldX = Table2.FieldX)... ? Thanks!
  9. jonsan

    Need help with an SQL Update

    UPDATE Table1 SET Table1.FieldX = TRUE WHERE (Left(Table2.FieldY,3) = '000') AND (Right(Table2.FieldZ,7) = Right(Table1.FieldZ,7)) Will this work? Do I need to use a JOIN statement to test the fields from each record in Table2? Thanks!
  10. jonsan

    Access 2000 Comparing and joining two tables

    I need to compare two identical (in terms of design) tables, and then take an action depending on the comparison. To be more specific, I need to take FieldX from Table1, and look in Table2 to see if there is a record with a matching value of FieldX. If there isn't a match, the entire record...
  11. jonsan

    Using ODBC Connection in Excel VBA

    I did not find any files with those names. I know how to use a ADODB object to create and open a connection to an Access database, I am just not sure what object to use to connect to a different type of database. Like I said, I have the connection string (which specifies ODBC), and the SQL...
  12. jonsan

    Using ODBC Connection in Excel VBA

    I need to open an ODBC connection to a database. I have the connection string (I used the record macro feature to find it), but I don't know what object or syntax to use. I have an update query written in SQL that I need to execute on the databse from the macro. Can anyone give me a code example...
  13. jonsan

    Updating Access Tables from Excel VBA

    Okay, next issue here: I need to perform the Update Query on multiple tables in the same DB. Should I just use multiple execute statements with the same Connection object, or is there a way to write the Update SQL so it performs the update in multiple tables? Thanks! J
  14. jonsan

    Updating Access Tables from Excel VBA

    Oops. Just me being a dolt and rushing to the forum too quick! :) Thanks! Jonsan
  15. jonsan

    Updating Access Tables from Excel VBA

    Okay, here is my code: <code> Sub RemoveFax(sAreaCode As String, sFaxNum As String) Dim cConn As ADODB.Connection Dim sSQL As String, sConn As String, sDB As String Dim lCount As Long Dim sFaxRem As String sFaxRem = sAreaCode & sFaxNum 'Instantiate the...
  16. jonsan

    Updating Access Tables from Excel VBA

    Thanks! Exactly what I was looking for. Jonsan
  17. jonsan

    Updating Access Tables from Excel VBA

    I need to update multiple Access tables within the same database from an Excel Macro. I am not sure which ADO object to use, or the correct syntax. I am familiar with SQL, and already have the Update Query written. Can anyone help? Do I need to provide more/different information? Thanks! Jonsan

Part and Inventory Search

Back
Top