Results 1 to 10 of 10
  1. #1
    5 Star Lounger bfxtrfcmgr's Avatar
    Join Date
    Aug 2002
    Location
    Fresno, California, USA
    Posts
    995
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Over-ride query criteria (2002 SP-2)

    In a query for a report, I have the following criteria (among others):
    <(Date()+89)
    This is to return records less than 89 day old. Yet, there are some records I always want to appear on the report (regardless of age). Any ideas?

    Ooops: That should have been: <([datRequestDate]+89)
    Bryan,
    Not the smartest critter on the glacier. . .
    . . .but I'm persistent (does that count?)

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 28 Times in 28 Posts

    Re: Over-ride query criteria (2002 SP-2)

    You'll have to specify which records you always want to appear.

  3. #3
    5 Star Lounger bfxtrfcmgr's Avatar
    Join Date
    Aug 2002
    Location
    Fresno, California, USA
    Posts
    995
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Re: Over-ride query criteria (2002 SP-2)

    I figured to do that based on numTeamNumber, and designate the team as 0.
    Bryan,
    Not the smartest critter on the glacier. . .
    . . .but I'm persistent (does that count?)

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 28 Times in 28 Posts

    Re: Over-ride query criteria (2002 SP-2)

    Please explain further.

  5. #5
    5 Star Lounger bfxtrfcmgr's Avatar
    Join Date
    Aug 2002
    Location
    Fresno, California, USA
    Posts
    995
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Re: Over-ride query criteria (2002 SP-2)

    Curses! "<([datRequestDate]+89)" isn't right either!

    Each record has a team number (numTeamNumber) and the date the request was entered (datRequestDate). I only want to return records that are less than 89 days in age from Date(), except for those records that have a numTeamNumber of "0" - I want those records to always appear, regardless of age. The report is sorted by numTeamNumber, so the "0" team records will always appear at the top.
    Bryan,
    Not the smartest critter on the glacier. . .
    . . .but I'm persistent (does that count?)

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 28 Times in 28 Posts

    Re: Over-ride query criteria (2002 SP-2)

    In the first Criteria line, in the datReqDate column, enter <code>> Date()-89</code>. In the second criteria line, in the numTeamNumber column, enter 0.

    Criteria in the same line are AND criteria: a record must satisfy both conditions at once.
    Criteria in different lines are OR criteria: a record must satisfy one condition, or the other one (or possibly but not necessarily both)

  7. #7
    5 Star Lounger bfxtrfcmgr's Avatar
    Join Date
    Aug 2002
    Location
    Fresno, California, USA
    Posts
    995
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Re: Over-ride query criteria (2002 SP-2)

    <img src=/S/bullseye.gif border=0 alt=bullseye width=45 height=15>
    ...too obvious for me to figure out.
    <img src=/S/noevil.gif border=0 alt=noevil width=25 height=17>
    <img src=/S/thankyou.gif border=0 alt=thankyou width=40 height=15>
    Bryan,
    Not the smartest critter on the glacier. . .
    . . .but I'm persistent (does that count?)

  8. #8
    5 Star Lounger bfxtrfcmgr's Avatar
    Join Date
    Aug 2002
    Location
    Fresno, California, USA
    Posts
    995
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Re: Over-ride query criteria (2002 SP-2)

    Little more help?
    For conditional formatting of txtbx on report:
    Between DateAdd ("d",+1,[datRequestDate]) And DateAdd ("d",+29,[datRequestDate])
    I want to set the condition for records btwn 1 and 29 days old (from request date).
    <img src=/S/hairout.gif border=0 alt=hairout width=31 height=23>
    Bryan,
    Not the smartest critter on the glacier. . .
    . . .but I'm persistent (does that count?)

  9. #9
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 28 Times in 28 Posts

    Re: Over-ride query criteria (2002 SP-2)

    Try

    [datRequestDate] Between Date()-29 And Date()-1

  10. #10
    5 Star Lounger bfxtrfcmgr's Avatar
    Join Date
    Aug 2002
    Location
    Fresno, California, USA
    Posts
    995
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Re: Over-ride query criteria (2002 SP-2)

    Try? Are you ever wrong?
    Man, I wasn't even in the right stadium!
    <img src=/S/thankyou.gif border=0 alt=thankyou width=40 height=15>
    Bryan,
    Not the smartest critter on the glacier. . .
    . . .but I'm persistent (does that count?)

Posting Permissions

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