Results 1 to 4 of 4
  1. #1
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Save file by a value in query feild (Access2000)

    Hi,
    You would need to open a recordset based on the query (in much the same way you opened one based on the recipients table), store the rst!td value in a variable, and then use that variable instead of Format(Now, "ddmmyy") when creating the file name.
    Hope that helps.
    Regards,
    Rory

    Microsoft MVP - Excel

  2. #2
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Save file by a value in query feild (Access2000)

    I should also mention that at this point, since you're opening the recordset anyway, you may find it easier to automate excel, create a new workbook and simply copy the recordset into it rather than opening the recordset, extracting the td field, closing it, and then outputting your query, opening excel and formatting some columns.
    Just a thought.
    Regards,
    Rory

    Microsoft MVP - Excel

  3. #3
    4 Star Lounger
    Join Date
    Aug 2001
    Location
    London, UK
    Posts
    516
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Save file by a value in query feild (Access2000)

    Ok, this is what my problem is, in the following VB code, I

  4. #4
    4 Star Lounger
    Join Date
    Aug 2001
    Location
    London, UK
    Posts
    516
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Save file by a value in query feild (Access2000)

    Hi Rory,
    I did what you told me to do (1st Reply) and it works.
    Thank you so much.
    <img src=/S/bow.gif border=0 alt=bow width=15 height=15>

Posting Permissions

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