PC Review


Reply
Thread Tools Rate Thread

Help please:-Passing parameters to a query from a module

 
 
Keith Stein
Guest
Posts: n/a
 
      1st Feb 2004
Hi,

I don't know any VBA but need to pass a range of dates to an append query.

The query has a parameter "matchdate" and i need to run the append query
each time for a speified date.

All i want to do is something like:

matchdate = #17/1/04#
run append query
matchdate=matchdate +1

Loop until matchdate = #25/12/04#

Can someone please give me a simple bit of code!

Many Thanks

Rob



 
Reply With Quote
 
 
 
 
John Vinson
Guest
Posts: n/a
 
      1st Feb 2004
On Sun, 1 Feb 2004 00:24:48 -0000, "Keith Stein"
<(E-Mail Removed)> wrote:

>Hi,
>
>I don't know any VBA but need to pass a range of dates to an append query.
>
>The query has a parameter "matchdate" and i need to run the append query
>each time for a speified date.
>
>All i want to do is something like:
>
>matchdate = #17/1/04#
>run append query
>matchdate=matchdate +1
>
>Loop until matchdate = #25/12/04#
>
>Can someone please give me a simple bit of code!


No code and no loop is needed.

Instead, create a small table with one date/time field; fill it with
all the dates in the desired range (you can do this quickly in Excel).
Include this table in your Append query with no join line, so that the
date is included on every row.

NOTE: Date literals in Access MUST be in either mm/dd/yy or an
unambiguous format (such as 17-Jan-2004). Day/month/year dates *WILL*
be misinterpreted.

John W. Vinson[MVP]
Come for live chats every Tuesday and Thursday
http://go.compuserve.com/msdevapps?loc=us&access=public
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Passing parameters to a Web Query Raymond D'Anjou Microsoft Excel Programming 1 10th Dec 2009 09:51 PM
Passing Parameters from one query to another norm Microsoft Access Queries 4 15th May 2008 08:59 PM
passing parameters from one query to another =?Utf-8?B?Q29zcw==?= Microsoft Access Queries 2 28th Jun 2005 07:27 AM
Help passing parameters to a query Brian Microsoft Access Queries 1 8th May 2004 06:18 PM
Help please:-Passing parameters to a query from a module Keith Stein Microsoft Access Queries 1 1st Feb 2004 03:01 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:53 PM.