Results 1 to 5 of 5
  1. #1
    Christian1977's Avatar
    Christian1977 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2013
    Location
    Milano
    Posts
    19

    Update more queries with the same parameters

    Dear All,



    I have a db with a lot of queries and I need to update them every week with a progressive weekly number.
    Now I update them manually.

    Es.: Next week, will be the week number 26, so in the query field "Week" I change it from 25 to 26. Next week I'll change it from 26 to 27 and so on every week.

    Could you help me? Thanks

  2. #2
    rzw0wr is offline I will always be a newbie
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Indiana
    Posts
    479
    look into DateDiff(() function.

    http://www.techonthenet.com/access/f...e/datediff.php

    Dale

  3. #3
    Christian1977's Avatar
    Christian1977 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2013
    Location
    Milano
    Posts
    19
    Thanks rzw0wr,

    maybe I hadn't explain very well my problem.
    I'd like insert a number of the new week in a query or in other elements one time and update all queries, like a variable. Thans

  4. #4
    rzw0wr is offline I will always be a newbie
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Indiana
    Posts
    479
    I understood and I gave you an answer.

    Datediff() should solve your problem.

    Datediff("ww",#1/1/2013#,Date()) should return the week number of this week.

    Dale

  5. #5
    Christian1977's Avatar
    Christian1977 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2013
    Location
    Milano
    Posts
    19
    Great Job!

    Problem Solved! Thanks

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 18
    Last Post: 03-25-2013, 11:08 PM
  2. Replies: 3
    Last Post: 02-22-2011, 01:28 PM
  3. Multiple Choices for Parameters with VBA and Queries
    By weasel7711 in forum Programming
    Replies: 3
    Last Post: 02-02-2011, 09:19 AM
  4. Sending parameters to queries - Revisited
    By Merkava in forum Programming
    Replies: 3
    Last Post: 12-08-2009, 01:05 PM
  5. Send parameters to queries
    By Merkava in forum Programming
    Replies: 8
    Last Post: 11-06-2009, 02:31 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums