Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Mar 2002
    Posts
    164
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Easy Query Help (2000)

    I apologize beforehand, bc I should proably know how to do this. I'm a web developer who can make this work in no time on the web, I'm just not sure in access. So here goes. I've got a simple table called task where I have the following fields...

    task_id - autonumber(primary key)
    date_submitted - date
    desc - memo
    reminder - yes/no
    date_reminder - date
    date_due - date
    priority - number
    complete - yes/no

    I'm trying to write a query that will return a list of descriptions as well as due date, priority if the reminder is checked and the date is today. I've used the wizard to build this so far...

    SELECT task.desc, task.reminder, task.date_reminder, task.date_due, task.priority
    FROM task
    WHERE task.reminder = yes
    GROUP BY task.desc, task.reminder, task.date_reminder, task.date_due, task.priority
    ORDER BY task.priority;

    I know I need to include a WHERE and probably an OR clause into it. Could someone give me an example on how I can do this? I'm bascially loss on how to get todays date. For example, where task.date_reminder = (Now)

  2. #2
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Mishawaka, Indiana, USA
    Posts
    145
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Easy Query Help (2000)

    I find it is much easier to write your SQL by using the graphical interface. Open query / design, add your table, add your fields, then write your criteria in the criteria line. The criteria for today is Now() and the criteria for reminder is Yes.

    Note that I have used a table called tblTask. Substitute your table name.

    While in the graphical interface you can view, edit, or copy the SQL by going to View SQL View.

    SELECT tblTask.task_id, tblTask.date_submitted, tblTask.desc, tblTask.reminder, tblTask.date_reminder, tblTask.date_due, tblTask.priority, tblTask.complete
    FROM tblTask
    WHERE (((tblTask.date_submitted)=Now()) AND ((tblTask.reminder)=Yes));

  3. #3
    2 Star Lounger
    Join Date
    Mar 2002
    Posts
    164
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Easy Query Help (2000)

    Thank you so much!!! It worked perfectly. I will definitely take your advice also. 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
  •