Search results

  1. J

    imprting file with oldest date

    i don't quite follow what you've done here. I 3 3 buttons on my form, 1 imports data & cleans it up, 2 prints out reports and 3 exports the data. so i want sub on button 3 to access variables set by button 2. Here is my code (the 2 starred lines in button 3 are the lines that i want to be able...
  2. J

    imprting file with oldest date

    What i want to do is to use the same filename in a different function, because after the converted file has been converted it needs moving, so rather than working out the oldest file and possibly getting a different answer, i thought that the best thing to do would be access the same variable...
  3. J

    imprting file with oldest date

    Brilliant, works a treat, thanks very much for all of your help this has been most appreciated. Thanks for the comment too, i think it helps that i do php coding so i can just about grasp what a piece of code does (it helps when variables & stuff are well labelled like yours, not like the...
  4. J

    imprting file with oldest date

    just tried changing the system clock. It seems to not like files created on the same date as the system clock. (i assume this is because the < dtmDate is the system clock ??). Any suggestion on how to get around this? It works fine other than this problem.
  5. J

    imprting file with oldest date

    its very strange, there are files in the folder, and the script finds them. I have moved another file into the folder, and it works. The files that were there were all created today, the file i copied was older. It works with the older file in there but not the newer file.
  6. J

    imprting file with oldest date

    just figured out where i was going wrong, the formatting of your code was slightly messed up in the copy & Pasting. Now i get a different error, The action or method requires a FileName argument
  7. J

    imprting file with oldest date

    OK i have done this I copied & pasted your code into a module. This is my code, Private Sub Command5_Click() DoCmd.TransferText acImportFixed, "Import", "tblImport", GetTheOldestFile("\\capt_kirk\conversion\data\caa", "*.txt") End Sub When ever i try running it i get "Compile error, sub or...
  8. J

    imprting file with oldest date

    i am assuming it is fine to use network paths as filepaths, eg. \\servername\folder\file *.txt SO i've got DoCmd.TransferText.... when i use GetTheOldestFile( do i put in the folder i want it to look in, in the parenthesis?. eg. GetTheOldestFile("\\server\folder", "*.txt") thanks
  9. J

    imprting file with oldest date

    Yeah tell me about it. I wasn't the happiest i can tell you. especially as i have a couple of other prjects which also have to be done asap. oh well Any thanks very much for this greately appreciated. Now for the real idiot question, how do i go about using the code? i assume i use the RunCode...
  10. J

    imprting file with oldest date

    Erm. no i haven't got the import automated, at the minute i just use a macro with a transfer text, import file. (i've not really used vba before and my boss has said that he wants this doing in 50 minutes time !)
  11. J

    When open form close previous

    I have done something similar to this, but what i did was have a hyperlink on the button on form 1 pointing to FORM2, which an OnClick macro that was just a close form action. Lo-Tech but it works
  12. J

    imprting file with oldest date

    I have a database which imports data from a text file does some conversions & reports and exports to a text file. What i need to do is instead of specifying the filename, is to tell it to get the oldest file in a folder as the import file. Then when the conversions have been done, move the file...
Back
Top Bottom