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 SkipVought 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. 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)
  16. wemeier

    Get control names from form in another database

    RoyVidar, Thanks for the quick reply. I'm not familiar with .currentproject.allforms. I'm still using Access 97. Is this in a later version? If so, can you think of anything I can do in Access 97? I tried your code, but it rejected. [shadeshappy] Cruising the Information Superhighway...
  17. wemeier

    Get control names from form in another database

    I am trying to develop an Access application that will use VBA code to open another Access database and create an ASCII file of the names of all forms in that database and the names of the controls contained within each form. When the forms are in the local database I can walk through the Forms...
  18. wemeier

    Create a command button to import excel file

    If you try to manually import the Excel spreadsheet (i.e. right-click and choose Import) do you get the subscript error? Does the table already exist? If neither is true, I'm not sure why you're getting the error. Try adding a DoEvents after the RunCommand and see if it clears up the...
  19. wemeier

    Print more than one Report

    dhookom's right. There's no way to do FIRST 10. You can do TOP 10, but you'd have to have a sort field that will enumerate the customers in the order in which you want to pull them off. Assuming you can do the above, the coding to generate the reports is relatively simple. Create VBA coding...
  20. wemeier

    File Extension Problem

    You should be able to import a file ending in ANY extension as long as you can identify its type. The file may not show up in the Import dialog box when you choose Text as the type, but you can still enter the full name of the file in the File name textbox and it will import. [shadeshappy]...

Part and Inventory Search

Back
Top