Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2007
    Location
    Kenosha, WI
    Posts
    6

    Question Unanswered: Crazy Query Question...

    Hi everyone....

    I hope that I can explain my question clearly... if more info is needed please let me know

    Background:
    I have made a form that submits information to a query that will let you enter in your search criteria (Person Type and a Date)
    For example if you enter "Adult" and "4/10/07"
    It will display all records where:
    PersonType is equal to "Adult"
    AND
    The date "4/10/07" is entered in any one of five different field types.

    The Problem:
    Since the date can be located in any of five different field types, I need to find out the name of the field that the date was located in.

    Any help appreciated!

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    A way is to add extra columns to your query that tracks which column(s) match your target date. Ex:

    SELECT ... ,IIF(ThisDate=CDate(" & SrcDate & "),1,0) AS MatchColXXX, ...
    Back to Access ... ADO is not the way to go for speed ...

  3. #3
    Join Date
    Feb 2007
    Location
    Kenosha, WI
    Posts
    6
    Thank you so much. I was a little retarded at first and wasn't quite sure how you were suggesting I do it... (my first time doing an IIF statement in an access query) But it works awesome!!! Thanks again!

Posting Permissions

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