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 Mike Lewis 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. llocklin

    Calling a subroutine as a variable

    Check out the Eval function in the help file. Luther
  2. llocklin

    Out of string space (Error 14)

    Why not just open the file in VBA and bring it in yourself? Luther
  3. llocklin

    Is Access/VBA is the right tool for file manipulation/FTP

    Access is capable of this. You could either poll the directory periodically or (if you are API enabled) set up a shell notification. I'd probably just go with the polling periodically unless the time period is very short. Luther
  4. llocklin

    Checking Filepath of MSAccess.exe

    Try syscmd(acSysCmdAccessDir) Luther
  5. llocklin

    Want to open "sheet2" of spreadsheet with ole

    I don't remember where I got this code, most likely it was some combination of Getz's Developers Handbook and the microsoft Knowledgebase. This will set a reference to your sheet2: Dim objXLApp As Excel.Application Dim objXLBook As Excel.Workbook Dim objDataSheet As Excel.Worksheet Set...
  6. llocklin

    Immediate window with the forms

    You can hit Ctrl-G from anywhere and the immediate window will open. Luther
  7. llocklin

    How to change field's type and field's size of existing table's field?

    I copied this code directly from the MS Knowledgebase search results for "change field data type": ACC: How to Change a Field's Data Type at Run Time with Code (Q128016) '***************************************************************** ' The AlterFieldType Sub procedure...
  8. llocklin

    Help with report fields

    My first thought is to base the report on a query and create the calc'd field there. An example calculated field might be: PastDue: iif(now() - DueDate > 14, True, False). Use a totals query and count the True values. This probably isn't the optimal method, but it'll work. Luther
  9. llocklin

    Nesting Queries

    Well, you caught me in a lie. I don't often open a recordset from a recordset (since it's just as easy to just create another recordset...). Set the filter property of the 1st recordset and then when the second recordset is created it will implement the filter. Here's the rewritten example...
  10. llocklin

    I would like to go into a form and

    I'm sorry. It was late. I believed that you were trying to save the original value of form controls bound to a data table or query prior to editing those values. In foxpro days you would've used Scatter / Gather. Anyway, for bound controls, Access does this for you in the form of the...
  11. llocklin

    Nesting Queries

    While the RunSelectQuery can return a reference to a recordset (since being unspecified, it's a variant), I would have thought that the recordset it is referencing is destroyed as soon as the code exits RunSelectQuery since the recordset created is local to the function. If you want to use a...
  12. llocklin

    I would like to go into a form and

    If you're using bound controls, look up the OldValue property in the help file. Access may be already doing what you want. Luther
  13. llocklin

    Switch databases with VBA?

    To have programmatic control over the newly opened database, use automation to open it which will return an application reference you can use to control things. The security is contained in the workspace object so you'd need to create a new work space or clone the default workspace. Luther
  14. llocklin

    String length problem

    Running this useless function: Public Function testme() Dim sTemp As String sTemp = String(500, "x") MsgBox sTemp End Function proves that strings hold more than 255 chars. Therefore, something else is going on. I have built functions that do exactly what you're doing...
  15. llocklin

    Create table, could not find it, to fast?

    I use these sql definition statements regularly without issue. However, I never use Currentdb without assigning it to a variable of type Database. Having said that, I tried your code in an acc97 module, and after commenting out the undeclared vars and functions it worked as is (850 Mhz...
  16. llocklin

    Programmatically Creating Modules in an Access 97 Database

    A search of the MS KB gives ACC2000: How to Programmatically Create, Search, Replace, and Modify Code (Q208793) with examples of exactly what you're wanting to do. Luther
  17. llocklin

    Text Import routine does not work,can't Use TextTransfer...

    I import megabytes of data daily from a mainframe and have found the Access text import routines to be intolerant of deviations in the specified line length resulting in inconsistent imports (you never know how it's going to fail). My resolution was to write my own import routine based on a...
  18. llocklin

    Tell me where my MDB or LDB file is???

    Here's what I use to get the user/machine list: As I review the code I just pasted in, several of the functions are from Getz's Access Developers Guide (best book on access I've ever seen) so I don't feel right posting them here but heres what they do: dhRInstr - returns the rightmost...
  19. llocklin

    How to change field's type and field's size of existing table's field?

    Your code is passing a field object as the argument to the delete method. The method is documented as taking a string containing the name of the field as its argument. Using your example: change: tbl.Fields.Delete fld to: tbl.Fields.Delete fld.name Luther
  20. llocklin

    Make Table Query - Is There No One Who Can Tackle This?

    I have a similar situation with a datamart type of app. I perform all processing in a master and copy the result tables to the 'shared' copy on a routine basis. If the copy fails, I trap the error, read the .ldb to determine the user, 'net send' a get out message and wait for them to get out...

Part and Inventory Search

Back
Top