Recent content by LaBam

  1. L

    Count the number of fields in a delimited text file

    Thanks very much for the code sample. But I cannot get it to run. Whenever I run it, I get the error "Subscript out of range". And when I looked at the file, I fould out that the program has deleted all its contents. There was nothing in the file. Each time the error comes up, it highlights the...
  2. L

    Count the number of fields in a delimited text file

    ByteMyzer, Thank you very much for the response. I've tried including the function you suggested but it's not giving me what I want. I'm getting zero anytime I run it. I believe I'm not using it correctly. Could you please give me a sample code on how it could be used correctly. I thank you...
  3. L

    Count the number of fields in a delimited text file

    Please help me. I hope there is way this could be done in VBA. I have a text file that has delimiters "|" separating the various fields. I want to write a code that will count the number of delimiters in each line in the text file. The idea is for my code to report whenever it encounters a...
  4. L

    Writing SQL in VBA

    Big thank yous to both WORKMAD3 and BIGSTAV. It worked perfect!
  5. L

    Copy Files from an FTP folder using VBA

    I have this piece of code which copies set of files from one directory to another; from "C:\Tol" to "F:\FldConvert". It works fine for as long as the drive is not FTP. Could someone help me with how to access ftp folders through VBA. Here is my code. Please help: Dim objFS As Object...
  6. L

    Writing SQL in VBA

    Sorry I posted this thread twice. It was not intentional. My Internet connection was not too good.
  7. L

    Writing SQL in VBA

    Sorry I posted this thread twice. It was not intentional. My Internet connection was not too good.
  8. L

    Writing SQL in VBA

    Sorry I posted this thread twice. It was not intentional. My Internet connection was not too good.
  9. L

    Writing SQL in VBA

    I'm trying to write a query in VBA to sum and count salaries and persons based on dates on a form. But I keep getting SYNTAX ERROR. Could someone please help me write this in the correct form it should be. Here is my code: Set rstOutGoingMin = "Select AllNames, Sum(Salary) As TotalSalary...
  10. L

    Writing SQL in VBA

    I'm trying to write a query in VBA to sum and count salaries and persons based on dates on a form. But I keep getting SYNTAX ERROR. Could someone please help me write this in the correct form it should be. Here is my code: Set rstOutGoingMin = "Select AllNames, Sum(Salary) As TotalSalary...
  11. L

    Error Opening a Query With Criteria Through Code

    Thank you very much RuralGuy. I'll try the siggestions you gave later in the day and get back to you ASAP. I'm kinda squeezed right now.;)
  12. L

    Error Opening a Query With Criteria Through Code

    May be this has been solved in this forum before but I can't find it. Here it goes. I have a code I wrote to open a query and use its values to update a table. The query gets its Date range from the StartDate and EndDate controls on the form. The query runs fine if i open it by double-cliking...
  13. L

    ODBC Call Fail

    Thanks for the reply. (You're quite right, I'm working on CDRs.) I'm quite new to SQL so please bear with me if i seem to be asking too simple questions. Could you please elaborate on how I could set the timeout properties in the SQL database and in the registry?
  14. L

    ODBC Call Fail

    I have a database in MS Access with tables linked to an SQL Server 2000. Whenever i run my code that has to do with opening these tables, i keep on getting the error message that the ODBC has timed out. This is the portion of the code that is giving the error. Please help...
  15. L

    Reading from a Text File Backwards...

    Thanks for the quick response. You see, the thing is I want the cursor to move to the previous line in the text file only when the current condition is met. If the condition is not met, it should stay with the current line.
Top Bottom