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 strongm 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. kkomar

    How do I connect to the default database in DAO?

    I just tried it and I get the same thing. Still going at it though, I won't give up! Here's what I have so far... Public Sub SQLToExcel(sqlString As String) Dim cnn As DAO.Database Dim qdf As DAO.QueryDef Set cnn = Application.CurrentDb Set qdf = cnn.CreateQueryDef("", sqlString)...
  2. kkomar

    How do I connect to the default database in DAO?

    No because this code is contained within a database which already has a connection open to a SQL server. CurrentDB is supposed to be a handle to that connection which you can point to. However, at this point, I'll take any suggestions because nothing seems to be working :(
  3. kkomar

    How do I connect to the default database in DAO?

    I dont know if my references are wrong or what, but I still get the same error, even with the code in the way that you mentioned there. I actually had it like that previously and then changed it. I have DAO 3.6 up above ado etc etc... but i always get that error... Is there some lame thing I am...
  4. kkomar

    How do I connect to the default database in DAO?

    I'm trying to connect to the default DB in DAO so i cna create a temp query and do the following simple action: ------------- Function SQLToExcel(sqlString As String) Dim cnn As DAO.Connection Dim qdf As DAO.QueryDef Set cnn = CurrentDb Set qdf = cnn.CreateQueryDef(Null, sqlString)...

Part and Inventory Search

Back
Top