Recent content by elwi

  1. E

    How to execute SQL in automation

    Appreciate your assist. I decided not to execute the query in the automation code. Worked better to run a procedure in the remote database that performed several operations including executing the procedure.
  2. E

    How to execute SQL in automation

    I'm opening a second database (db2). Copying the structure of a db2 table to db3. Populating the table in db3 with a subset of records from db2. I've gotten as far as opening the db2 and copying the table structure. Can't figure out how to run the query using execute rather than...
  3. E

    OenCurrentDatabase question

    Re: OpenCurrentDatabase question Followup: Uncovered the issue with my original code. The problem was an Access setting. In Access Options | Client Settings | Advanced | Open last used database when Access starts was checked. When that was removed. Original code worked. :banghead:
  4. E

    OenCurrentDatabase question

    Revised to Set appAccess = GetObject(DLookup("strImp", "qlkpImpSb"), "Access.Application") Works fine now. Thanks for your assist.
  5. E

    OenCurrentDatabase question

    I had seen this suggestion on another post and tried it, but doing something wrong Using this.. Dim appAccess As Object >>Set appAccess = GetObject(DLookup("strImp", "qlkpImpSb")) appAccess.Visible = True 'import code here Set appAccess = Nothing Got "Automation error, Unspecified error" on...
  6. E

    OenCurrentDatabase question

    Access 2013 I have a database open and a form with a button to accomplish the following: 1. open another database instance 2. import Excel files into db2 3. close the other database instance I'm using the following code: Dim appAccess As Access.Application Set appAccess = New...
  7. E

    Object invalid or no long set

    Absolutely. I'm a recordset newbie who is learning the hard way.
  8. E

    Object invalid or no long set

    You got it! I added a Debug.Print on rsF(strFldNmK) and it spit out a single record. Turns out that record was missing a value in strTpK. Soon as I filled that in, I was off to the races. Why didn't I think of doing that hours ago!! Elementary. Thanks for digging me out.
  9. E

    Object invalid or no long set

    First loop.
  10. E

    Object invalid or no long set

    You're right. When I cut part of the code to shorten it, I and accidently cut the End Select. Code does compile. I added the .value in the code but still no joy. Still erring with the same message.
  11. E

    Object invalid or no long set

    Access 2013 Code that has been working is suddenly causing the error "Object invalid or no longer set". Line causing the error is marked. Anyone run into this before? I've spent half the day on this getting nowhere fast. Private Sub CreateTable() Dim dbsDb As dao.Database Dim...
Back
Top Bottom