Search results

  1. 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...
  2. 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...
  3. 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...
  4. 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...
  5. 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...
  6. 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...
  7. L

    Reading from a Text File Backwards...

    I need help here. I'm writing a program to be able to read a text file. I have been able to open and read the file correctly thanks to the search utility in this forum. However, I want it to read the previous line whenever a condition is not met. Could someone please show me the code for this...
  8. L

    Compile Error: Procedure too large.

    I’m writing a procedure to compute the Total Interest on Loans using the Monthly Reducing Balance principle for a total period of 25 years (300 months). It works fine for as long as it’s under one sub procedure but then I get the error message “Procedure too large” when the whole code is placed...
  9. L

    Authenticate database deletion

    Is there a way (code or otherwise) that one can prevent unauthorised users from deleting my database from the hard disk?
  10. L

    Wording for "Letter of Completion"

    I’m in need of help here. I’ve applied for a job and have almost got the appointment. But my prospective employer is asking that I present them with LETTER OF COMPLETION for each and every project I have undertaken. I’ve approached my past clients and they are willing to give me these if only I...
  11. L

    Automatically Quit after a specific period of no key pressed.

    I want to add some security to my application and I was just wondering if this is possible with Access. Is there a way one can ask an Access application to Save All and Quit if the cursor is not moved and no key is pressed for a specific period, say 30 minutes? You see, my users deal in very...
  12. L

    Error Accessing File

    I am not sure where to post this question. Please help. I have a form on my application which has gone bad. Any time I tried loading it, I get the following error message. “ERROR ACCESING FILE. NETWORK CONNECTION MAY HAVE BEEN LOST.” I also get the same message when I tried accessing its code...
  13. L

    Reducing Balance Code

    Please help! I am stock here. I am developing a Payroll System for my office. I am looking for a VBA code to calculate the Interest on a loan using the Reducing Balance technique. It should be such that all we need to do is supply the Principal, Interest and Duration in months (even if the...
  14. L

    Tax Table.

    Can someone out there help me? I’m developing a Payroll System for my office and I would like to use a table to capture the PAYE tax structure (for employees) so that I won’t have to go into the codes/queries to effect changes whenever the tax changes. Of course, the tax changes almost every...
  15. L

    Now less 60 minutes

    Please help. Does anyone out there know how to subtract 1 hour (60 minutes) from the current system date and time and give the result in the same format using VBA? What I have in mind is using the Now function in VBA to retrieve the current system date and time, subtract 60 minutes from it, and...
  16. L

    Code to pause for specific time.

    Is there a way to code in VBA so that on reaching a particular line of code, the application will wait for a specified duration, say 45 seconds, before moving to execute the next line of code. Quite desperate here! Please help.
  17. L

    Date Format Problem.

    How do I format a date which displays both date and time to show only the date and discard the time? That is, a date like 14/11/02 12:45 should only show 14/11/02. Thanks!
  18. L

    Create a .bat file.

    I use the following MS DOS command to convert, append and rename all .t files in the C:\Bam folder to a .txt file named Kotor.txt It works perfectly. C:\Bam> for %1 in (*.t) do type %1 >> Kotor.txt My problem now is to create a .bat file that will do precisely this. That is, on calling the...
  19. L

    Copy files based on date modified/created.

    I use this code to copy all MS Word files from C:\Bam\Renewals to E:\Transfers\Updates. It works perfect. Dim lb As Variant Set lb = CreateObject("Scripting.FileSystemObject") lb.CopyFile "C:\Bam\Renewals\*.doc", "E:\Transfers\Updates\" What I want to do now...
  20. L

    Automate copy, convert to text file and ...

    I need help here. I work with a billing system (server), which generates a T file every hour. It names the files sequentially in the format yyyymmddhh. For example, A2002110100, A2002110101, A2002110102 are the first three files generated on November 1, 2002. Every 24 hours, I manually copy all...
Back
Top Bottom