Results 1 to 5 of 5
  1. #1
    Join Date
    May 2009
    Posts
    12

    Unanswered: macro to copy and replace table

    I hope i can explain what i am trying to achieve.

    i have my roster DB working so far, ( there are a couple of things i need to fix),
    at the moment my roster reports get there dates from a table called current dates, for 2009 it is a copy of a table called 2009dates, i also have a table called 2010dates, i would like to be able to change the date table my reports look at by clicking a button, so i need at the click of a button to copy the 2009dates table and save it as the current dates table , or with the click of another button copy the 2010dates table and save it as the currentdates table.
    can someone help me to do this please.
    cheers
    geoff

  2. #2
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Sure. Here's a gun. It's loaded, keep your finger on the trigger, the gun aimed at your foot and start hopping.

    Sorry but I am not helping.

    Why not use the year of the dates as criteria rather than have endless tables full of dates??

    Why even store a table of dates? Are you sure it's necessary?
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  3. #3
    Join Date
    May 2009
    Posts
    12
    StarTrekker, i am not sure if you are just being sarcastic or serious.
    i am just trying to learn how to get things done myself.
    the dates are spacific, they aren't just running dates.
    the way i have had to set up my roster reports has made me do it this way as it was the only way i could work out to do it.

    i am using the date table to provide dates for my RDO report and well as my Afternoon shift report, as the dates are all begining of the week dates, but if there is a holiday then it is a tuesday that starts the week not a monday.

    the reason i am doing it this way is that from now till the end of the year people will want to know what there roster days are for next year, but we will still need to maintain this years as well.
    i thought it would be an easier idea to be able to replace a table with another. please help me understand why what i ask is so futile.
    that would really help

  4. #4
    Join Date
    May 2009
    Posts
    12

    Macro done

    well i have done the macro well 2 actually
    it is working fine
    not sure if it will stay like this but time will tell

    1 macro changes the current_dates table to 2009
    the other macro changes the current table to 2010

  5. #5
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Well as long as it's working fine
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

Posting Permissions

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