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

Recent content by wemeier

  1. wemeier

    Distro List and Attachment Lookup & Loop in VBA

    In the declarations area add the following: Dim db as Database Dim rst as Recordset [/[blue]] In the body of your code, surround the With... statement with the following: [blue] Set db = Currentdb() Set rst = db.OpenRecordset("<tablename>") While Not rst.EOF <this is where your "With"...
  2. wemeier

    VBA Code to copy tables in other databases

    Thanks, Southernx50! That worked perfectly! [shadeshappy] Cruising the Information Superhighway at the speed of light (your mileage may vary)
  3. wemeier

    VBA Code to copy tables in other databases

    pwise, Thanks, but that doesn't copy the indexes. The tables that I want to copy are heavily indexed. [shadeshappy] Cruising the Information Superhighway at the speed of light (your mileage may vary)
  4. wemeier

    VBA Code to copy tables in other databases

    PHV, Thanks for the tip. However, while doing what you say will work, it will bloat my applications database. I'm trying to avoid that. [shadeshappy] Cruising the Information Superhighway at the speed of light (your mileage may vary)
  5. wemeier

    VBA Code to copy tables in other databases

    I'm trying to find a way, using VBA, to copy a table from one external Access database to another external database. In other words, there are three Access databases involved (source, destination and code). Most of the copy commands are methods of DoCmd and only work when the database that is...
  6. wemeier

    Problem using user-defined function in query run with Execute method

    If I open the query that uses the function and run it, it works just fine. If I use Docmd.OpenQuery it works just fine. If I use DoCmd.RunSQL followed by the SQL code it works fine. Just using it with the .Execute method fails. I know .Execute has some limitations that the others don't --...
  7. wemeier

    Problem using user-defined function in query run with Execute method

    ImHuman, I said in my post that I copied the function into the new database as well. That's why I'm perplexed. I even checked all VB library references to make sure they were the same. [shadeshappy] Cruising the Information Superhighway at the speed of light (your mileage may vary)
  8. wemeier

    Problem using user-defined function in query run with Execute method

    I have VB code behind a form that uses the Execute method to run a query: db.Execute "qryAppendMovement" Within that query I reference a user-defined function named GTIN2UPC that I wrote. In one database the code executes perfectly. I put the form, the query and the function into a second...
  9. wemeier

    Windows thinks disk is full

    Thanks, wahnula! I'll give it a try. [shadeshappy] Cruising the Information Superhighway at the speed of light (your mileage may vary)
  10. wemeier

    Windows thinks disk is full

    I have a Windows XP machine with a 70GB hard drive. I'm using only 7 or 8 GB (by adding up the file sizes from a DOS DIR command). However, when I look at the C: drive under "My Computer" it says that almost all 70GB is used! I've cleaned out the Recycle Bin, deleted the contents of all...
  11. wemeier

    Error Handling

    The easiest way to trap the error is to use the Execute method instead of DoCmd: Dim db as Database Set db = Currentdb() On Error GoTo Err_Command84_Click db.Execute stDocName, dbFailonError Set db = Nothing If the query fails for any error control will be transferred to Err_Command84_Click...
  12. wemeier

    If Like then ElseIf

    When Access VBA sees the Then statement on the same line as the If statement it assumes that there is no Else and doesn't require an End If: If a = b then c Try moving the statement after each Then clause to a new line: If pcktype Like "*Ambulance*" Then XV = "Ambulance" ElseIf pcktype...
  13. wemeier

    Remembering selected record after ShowAllRecords

    I wish I could add keys, but I don't own this table. The data is actually from a mainframe report where not all records even have the same data! There are header records and detail records. I've managed to identify some common fields on the detail records that I am using for my browser. But...
  14. wemeier

    Remembering selected record after ShowAllRecords

    I have a subform that the user can filter. If the user selects a record from the filtered subform and presses a command button I want to "unfilter" (Docmd.ShowAllRecords) the subform, then position the user back on his/her selected record so he can see the record in relationship to those above...
  15. wemeier

    Get control names from form in another database

    RoyVidar, Thanks very much for the help. I had to tweak it a bit, but it works fine! [shadeshappy] Cruising the Information Superhighway at the speed of light (your mileage may vary)

Part and Inventory Search

Back
Top