Results 1 to 2 of 2
  1. #1
    wonderboynj is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2013
    Location
    New Jersey
    Posts
    1

    Post Best way to query my data

    Hi everyone.

    New here but I need some help, I can't figure out the best way to tackle this.

    I work for a sales organization and I'm working on pulling some data to report on when the following condition is true.

    When the sales rep goes on the appt, I need to see if they then created an opportunity at the same company anytime from 2 weeks before the due date until 30 days after the due date.

    When that condition is true, I want to end up a type of "Converted", "Not Converted" and then have it include the "Sales Stage".

    I have two tables created, Activities Ad Hoc and Opportunity Ad Hoc. Note that I just use adhoc data extracted from my database.

    Activities Ad Hoc has these fields.
    [Account ID],[Activity ID], [Due Date], [Created Date]

    Opportunity Ad Hoc has these fields
    [Account ID], [Created Date], [Opportunity ID], [Sales Stage]

    There are a few other fields in the tables, but the data isn't relevant to this.



    Hope somebody can help!
    Brian

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,926
    Build a query that joins the tables. Set criteria under [Opportunity Ad Hoc].[Created Date]:

    BETWEEN DateAdd("d",-14,[Due Date]) AND DateAdd("d","30",[Due Date])


    Advise not to use spaces, special characters, punctuation (underscore is exception) in any names. Nor reserved words as names. If used, must enclose in [].
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 2
    Last Post: 12-17-2012, 03:46 PM
  2. Replies: 27
    Last Post: 08-14-2012, 09:05 AM
  3. Replies: 13
    Last Post: 10-26-2011, 03:49 AM
  4. Replies: 5
    Last Post: 10-06-2011, 05:49 PM
  5. UnMatched Data Query (Edit Data)
    By pedraza4 in forum Queries
    Replies: 3
    Last Post: 06-16-2010, 07:29 AM

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