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 Westi 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: *

  • Users: godzi
  • Order by date
  1. godzi

    Excel vba using querytables

    I finally got it !!... problem solved.. thanks
  2. godzi

    Excel vba using querytables

    I think I solved the Login problem changing this line: sDB = Right(sPath, Len(sPath) - InStrRev("\", sPath) - 1) to: sDB = Right(sPath, Len(sPath) - InStrRev("\", sPath) - 3) Now the problem is with the Refresh portion. Run-time error '1004', SQL Syntax Error. It points at: .Refresh...
  3. godzi

    Excel vba using querytables

    Using the Debug method... I found this: sConn in its line: DBQ is: DBQ=E:\DBfolder\E:\DBname.mdb... I suspect the sSQL , FROM clause is also wrong... What should I change?
  4. godzi

    Excel vba using querytables

    hey PHV, I have included what you said, the code is this: Sub AccessData() Dim sConn As String, sSQL As String, sPath, sDB As String sPath = Application.GetOpenFilename("Access Files (*.mdb), *.mdb") If sPath <> False Then sPath = Left(sPath, InStrRev(sPath, "\")...
  5. godzi

    Excel vba using querytables

    The vba code was a macro recorded from the following SQL statement: SELECT DISTINCT OWNERS.WELL, OWNERS.OPERATOR, OWNERS.SEARCHID FROM `E:\X Folder\X database`.OWNERS OWNERS GROUP BY OWNERS.WELL, OWNERS.OPERATOR, OWNERS.SEARCHID HAVING (OWNERS.SEARCHID<>'1' And OWNERS.SEARCHID Not Like '%U')...
  6. godzi

    Excel vba using querytables

    I got: Run-time Error "450" Wrong number of arguments or invalid property assignment :(..... I am losing my nerves...
  7. godzi

    Excel vba using querytables

    The original . Recorded Macro for this code is: With ActiveSheet.QueryTables.Add(Connection:=Array(Array( _ "ODBC;DSN=MS Access Database;DBQ=E:\OK.mdb;DefaultDir=E:\;DriverId=25;FIL=MS Access;MaxBufferSize=2048;PageTimeout=5" _ ), Array(";UID=admin;"))...
  8. godzi

    Excel vba using querytables

    Error: Run-Time '9' Subscript out of range. I want to place the results.. say.. Sheet: DATA, "A1" :) Thanks
  9. godzi

    Excel vba using querytables

    I have this so far: Sub AccessData() Dim sConn As String, sSQL As String, sPath, sDB As String sPath = Application.GetOpenFilename("Access Files (*.mdb), *.mdb") If sPath <> False Then sPath = Left(sPath, InStrRev(sPath, "\") - 1) sDB = Right(sPath, Len(sPath) -...
  10. godzi

    Excel vba using querytables

    NO results, Just the Error.... I ma using Excel just to filter and handle some records as filtered using SQL statement, then I use other methods to export and automate Access. Which lines should I put the Debug.print??? ?
  11. godzi

    Excel vba using querytables

    I still get the error :(
  12. godzi

    Excel vba using querytables

    The dabatases are located in an external hard drive, I work with each single one of them, and then I place the results on a Main database. How would the final code be?..
  13. godzi

    Excel vba using querytables

    It is giving me the "error 438; Object doesn't support this property or method. Pointing at: .Connection = sConn :( Sorry I am new to the VBA environment....
  14. godzi

    Excel vba using querytables

    The vba code was a macro recorded from the following SQL statement: SELECT DISTINCT OWNERS.WELL, OWNERS.OPERATOR, OWNERS.SEARCHID FROM `E:\X Folder\X database`.OWNERS OWNERS GROUP BY OWNERS.WELL, OWNERS.OPERATOR, OWNERS.SEARCHID HAVING (OWNERS.SEARCHID<>'1' And OWNERS.SEARCHID Not Like '%U')...
  15. godzi

    Excel vba using querytables

    Hi, I have a question, I am using the Get External data option in Excel to pull an Access database onto my excel spreasheet, though, everytime I want to use it the database has a different location. How can I change the code in vba for me to prompt me a location, in the code I attached below...
  16. godzi

    Excel vba using querytables

    Skipvought, Thank you very much for that answer, I am testing the code... However... I want sDB to catch the PATH and Database name, since it is a different name eveytime !!!! say: same drive E:\ same folder , different database names.... thanks,
  17. godzi

    Excel vba using querytables

    Hi, I have a question, I am using the Get External data option in Excel to pull an Access database onto my excel spreasheet, though, everytime I want to use it the database has a different location. How can I change the code in vba for me to prompt me a location, in the code I attached below...

Part and Inventory Search

Back
Top