Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Sep 2002
    Location
    Granite Bay, California, USA
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    File Manipulation from Within Access (2000 (9.0.2720))

    I import a text file which is always the same (name, that is). How would I, at the end of a pretty hefty macro, rename the file to something else? Ideally, mmddyyyy(random 1-100 number).txt.

    I looked all over the web and can't find anything that makes sense to me.

    Thanks in advance.

  2. #2
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: File Manipulation from Within Access (2000 (9.0.2720))

    If you were to use VBA instead of macros then it is quite simply the NAME command.
    Pat <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

  3. #3
    New Lounger
    Join Date
    Sep 2002
    Location
    Granite Bay, California, USA
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: File Manipulation from Within Access (2000 (9.0.2720))

    Can I call some sort of VB function like that from a macro? Or would I have to convert all my macros to VB? Sorry for my ignorance. I haven't worked much with any of this stuff, and am more than a bit embarrassed by my own ineptness.

    I haven't a clue where to begin.

  4. #4
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: File Manipulation from Within Access (2000 (9.0.2720))

    What's this crap about ineptness and ignorance? Once you have worked with Access for quite a while (there is a lot to learn if you want to learn everything, and I don't know anybody who knows everything !!) you'll be right. After all what is the forum if not for asking questions?

    You could choose the RunCode command to run a function that is defined in the Modules, however, this would require some VBA code (not difficult).
    If you were to rename the file to yymmddhhnnss.txt then the function would be quite simple. If you want some help with this just holler.

    HTH
    Pat <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •