Re: Need to select a certain X records after a query in access
- From: "Duane Hookom" <duanehookom@xxxxxxxxxxxxxxxxxx>
- Date: Fri, 7 Oct 2005 22:57:48 -0500
Is there only one record per date? If so, you can use a TOP 15 query
SELECT TOP 15 ....
FROM tblSomeTable
WHERE [SomeDate]>=Forms!frmYourForm!txtStartDate
ORDER BY [SomeDate];
--
Duane Hookom
MS Access MVP
"ab" <ab@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:0A545B4E-5B13-48A7-B330-F37BB6009B67@xxxxxxxxxxxxxxxx
> Duane,
>
> THANKS for the quick response. Unfortunately that will not work.
> Consider
> the fact that the date in which the user enters may be ANYWHERE within the
> week, so it won't always be 21 calendar days. I want to select ONLY the
> 15
> business days (records) prior to the date the user enters.
>
> So, I wanted to see if there was some mechanism to select the previous 15
> records of the results of a query.....or some other creative way to solve
> this problem.
>
> Now, you may think this is a rather simplistic problem to solve, and may
> wonder why I can't just look at a calendar or have the user do so....but
> I'm
> actually allowing the user to enter NUMEROUS (as in 50) dates, and want to
> analyze the TREND of certain data for the 15 business days prior to that
> date. (Just trying to expand on the problem definition a bit...)
>
> Ideas? THANKS again for the help!!!!
>
> "Duane Hookom" wrote:
>
>> Aren't 15 business days the same as 21 calendar days? Try create a form
>> with
>> a text box (frmYourFrom!txtStartDate) and use:
>>
>> Between Forms!frmYourForm!txtStartDate and DateAdd("d", 21,
>> Forms!frmYourForm!txtStartDate)
>>
>> --
>> Duane Hookom
>> MS Access MVP
>>
>>
>> "ab" <ab@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
>> news:7922457D-A190-4965-BC47-137F13171C2E@xxxxxxxxxxxxxxxx
>> >I have a table of data (.CSV file) that I'm trying to use Access 2003 to
>> > analyze. Each record within the table is essentially a business day
>> > (Monday-Friday) plus various data associated with that particular day.
>> > What
>> > I'm trying to do is allow the user to enter a START DATE, and use an
>> > Access
>> > query to generate all of the records from the START DATE to 15 BUSINESS
>> > days
>> > (not 15 calendar days) prior to the START DATE entered by the user.
>> >
>> > I know how to prompt the user to enter the START DATE within the query.
>> > What I don't know how to do is get Access to select/find the 15 records
>> > (business days) prior to the entered START DATE.
>> >
>> > Thanks for any help on this one !!
>>
>>
>>
.
- Prev by Date: Re: Need to select a certain X records after a query in access
- Next by Date: Re: Inconsistent query results
- Previous by thread: Re: Need to select a certain X records after a query in access
- Next by thread: Re: Append field from one query to another query?
- Index(es):
Relevant Pages
|