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: *

  • Users: TomHW
  • Order by date
  1. TomHW

    Determine Number of Rows in DoCmd.RunSQL Statement

    Remou: You are correct. I ran the code with the specific example I posted and it worked perfectly. The problem with my SQL statement was along the lines: INSERT INTO tblA SELECT * FROM [qryA]; The SQL statement worked with RunSQL, but with a QueryDef it did not like that the data behind FROM...
  2. TomHW

    Determine Number of Rows in DoCmd.RunSQL Statement

    Thanks for the replies. Remou: I haven't used DAO before so this idea never occurred to me. Since I have a dynamic SQL query that is run hundreds of times I decided to try a temporary QueryDef using the following instead but am having a problem - dim qdf as DAO.QueryDef dim strSQL as String...
  3. TomHW

    Determine Number of Rows in DoCmd.RunSQL Statement

    Is there any way to determine the number of rows that are about to be appended to a table using an insert query through DoCmd.RunSQL [query] ? If I don't turn warnings off, Access will visually display how many rows are about to be appended, but is there any way to access this in the code...
  4. TomHW

    Removing Switchboard Options with Access Security

    dRahme Thanks for the help. I use something very similar for all of my other projects, it is just that I am required to use the built-in Access security for this one and was trying to figure out why I should have to write my own routines to do this kind of thing when I am already using...
  5. TomHW

    Why not set text fields to 255?

    grnzbra, According to Access help, "You should use the smallest possible FieldSize property setting because smaller data sizes can be processed faster and require less memory." Although I too am not sure how memory size is actually managed internally with Access, this property has the added...
  6. TomHW

    Removing Switchboard Options with Access Security

    I have created a database using Access Security. I would like to know what would be the best way to disable options on the main menu form, ie. the Switchboard, that a user does not have access to as opposed to program using a popup to inform the user that they do not have permission to view a...
  7. TomHW

    C++ Runtime Error trying to edit VBA code in Access 2003

    With my problem it simply had to do with the default printer I had chosen in windows. Start -> Settings -> Printers, and then I changed my default printer to a new one. This fixed the problem. I have no idea as to why the printer matters when attempting to view the code behind a form, but it...
  8. TomHW

    FILTER function in Access VBA?

    I have noticed a few problems with the Filter function and the way you are attempting to use it. First, Filter wants to return a string array and will not allow you to return to a variant array, but it also wants a non-dim array. If you create an array of a certain size: Dim astrArray(5) as...
  9. TomHW

    C++ Runtime Error trying to edit VBA code in Access 2003

    Just recently I ran into this same error. The problem was with the default printer that I had selected. My default printer was have updates installed and this happened to cause a lot of Office issues that wouldn't seem like the default printer would matter. This caused me to get a C++ runtime...
  10. TomHW

    problem scanning over all non system table

    I ran your code and it finds all of the tables I have constructed so I cannot figure out why it would return one table twice. From what I see, ShowFields() is supposed to append all of the field names in the statement, but I do not see where you append the "Create table" & tablename part in your...
  11. TomHW

    Error handling syntax

    The following would work for negatives in the Ceiling function: Function Ceiling(ByVal iOne As Double, ByVal iTwo As Double) On Error GoTo HandleErrors Ceiling = Excel.WorksheetFunction.Ceiling(iOne, iTwo) ExitClean: Exit Function HandleErrors: Select Case Err.Number '...
  12. TomHW

    loop before execute

    Well in that case you may want something more along the lines of: Function chkdate() Dim dbs As DAO.Database Dim rst As DAO.Recordset Dim strSQL As String Dim blnEndLoop As Boolean blnEndLoop = False strSQL = "SELECT DateChk FROM tblDateCheck;" Set dbs =...
  13. TomHW

    loop before execute

    I am not exactly sure what everything in your code is attempting to accomplish. I am guessing that this code is supposed to loop contiuously until the date has changed (possibly for four hours) and then execute a new job when the date has changed. A few things I noticed: - Your variable...
  14. TomHW

    Shell Function using a variable for the path

    Why can't you just use: Shell(strPathName, vbNormalFocus) where strPathName is your variable holding the path? If you set up a function in a module to do this for you it seems as though you would just be making a new way to call Shell using basically the same arguments. Tom
  15. TomHW

    Runtime error 2113732605

    I've had this problem quite a while ago and remember clearing it up using the Logon method of the NameSpace object. I can't remember exactly the parameters I used for the Logon method but you might try adding the blue into your code: Dim objOutlook As Outlook.Application Dim objNameSpace as...
  16. TomHW

    Fitered record display not correct

    Your code may not be giving the form enough time to load all of the filtered records. Try adding: Me.RecordsetClone.MoveLast Before using: Me.RecordsetClone.RecordCount This will ensure that all records have been accounted for before displaying a count. Hope this helps, Tom
  17. TomHW

    EXCEL loop access

    Sorry, I've been on vacation for a few days. What I've noticed from your code that you originally posted with the error after importing the first file is that this line: DoCmd.TransferSpreadsheet acImport, 8, "TBL_DEC", objFile.Name, True Should be this: DoCmd.TransferSpreadsheet acImport, 8...
  18. TomHW

    EXCEL loop access

    This code goes inside of MS Access. Excel is not used at all. ADO and DAO are not necessary because "DoCmd.TransferSpreadsheet" does all of the work putting the information into the tables. You can run this code anyway you like in Access. For instance, you could create a form and put this code...
  19. TomHW

    WithEvents not Working Inside Own Class Module

    I understand your idea, but that doesn't seem to be the case here. I have created linked lists before in VBA with no issues. In fact, this one works quite well aside from not being able to Hook into events. If I change the code: Private WithEvents mobjNext as cListItem to: Private mobjNext as...
  20. TomHW

    EXCEL loop access

    This can be easily done. To get all of the files in a folder you could use something such as: Dim objFSO as Object Dim objFile as Object Dim strPath as String dim strFilePath as String strPath = "C:\Workbooks" Set objFSO = CreateObject("Scripting.FileSystemObject") For Each objFile in...

Part and Inventory Search

Back
Top