Page 1 of 2 12 LastLast
Results 1 to 15 of 19

Thread: Reminders

  1. #1
    Join Date
    Aug 2006
    Posts
    559

    Unanswered: Reminders

    I have an idea to try to make a "reminder" show when a task is not closed by like 7 days. I wanted it to prompt the users after they log in successfully, PRIOR to opening the frmMainMenu (switchboard).

    Found the sql query code of:

    Code:
    SELECT tblJobs.JobNumber, tblJobs.JobName, tblJobs.ExpectedCompletionDate, tblJobs.Complete
    FROM tblJobs
    WHERE (((tblJobs.ExpectedCompletionDate)<=Now()) And ((tblJobs.Complete)=0));

    So I figure:

    Code:
    SELECT tblTask.Task_ID, tblTask.TaskDescription, tblTask.Date_Originated, tblTask.Status
    FROM tblTask
    WHERE (((tblTask.Date_Originated)<=Now()) And ((tblTask.Date_Closed IsNull));

    Anyone know if that'll seems ok? Can you forsee any issues with it?

  2. #2
    Join Date
    Jan 2007
    Location
    California, USA
    Posts
    520
    Actually you are taking anything that is less than right now. I would suggest using Date() rather than Now() so you are not dealing with the time of day. Plus, I would think that you should be subtracting 7 from Date() so you will get things older than 7 days old.

  3. #3
    Join Date
    Aug 2006
    Posts
    559
    Quote Originally Posted by GolferGuy
    Actually you are taking anything that is less than right now. I would suggest using Date() rather than Now() so you are not dealing with the time of day. Plus, I would think that you should be subtracting 7 from Date() so you will get things older than 7 days old.

    Yeah, so instead of Now() , I'd put it Date()-7 ?

  4. #4
    Join Date
    Jan 2007
    Location
    California, USA
    Posts
    520
    Try it, let us know how it works.

  5. #5
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    The query will return all calls with an originated date less than todays date which haven't been closed... Now where is the 7 days bit coming into play?

    Perhaps you want to take a look at the DateDiff() function
    George
    Home | Blog

  6. #6
    Join Date
    Aug 2006
    Posts
    559
    Quote Originally Posted by GolferGuy
    Try it, let us know how it works.

    Tried it and got a 'syntax error' highlighting the "IsNull" part.

  7. #7
    Join Date
    Aug 2006
    Posts
    559
    Quote Originally Posted by GolferGuy
    Actually you are taking anything that is less than right now. I would suggest using Date() rather than Now() so you are not dealing with the time of day. Plus, I would think that you should be subtracting 7 from Date() so you will get things older than 7 days old.

    I switched Now() to Date()-7 ; however the issue is that it prompted me for the date I wanted, not the current date on the machine. Now I'm going to try to figure out that.

    SQL Code is as follows:

    Code:
    SELECT tblTask.Task_ID, tblTask.TaskDescription, tblTask.Date_Originated, tblTask.Status
    FROM tblTask
    WHERE (((tblTask.Date_Originated)<=Date()-7));

  8. #8
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Clue: IsNull() is a function
    Check the helpfiles - I'm sure there will be an example

    Also take a look at post 5

    30/05/2007 - 7 = ?
    Remember that
    30/05/2007 = 30-May-2007
    George
    Home | Blog

  9. #9
    Join Date
    Aug 2006
    Posts
    559
    Quote Originally Posted by georgev
    Clue: IsNull() is a function
    Check the helpfiles - I'm sure there will be an example

    Also take a look at post 5

    30/05/2007 - 7 = ?
    Remember that
    30/05/2007 = 30-May-2007

    Yeah, I took out the "IsNull" cause I realized it wouldn't work, just tried in the query anyways (brain fart).

    Put in the Date()-7 and it returns the stuff, just prompts me for what date to enter and I don't want that. i want it to like pull today's date automatically and calculate it. Going to look at that and try to figure it out.

  10. #10
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Why did you remove the IsNull() ? It sounds like you need it in this query - you're just using the function in the wrong way!
    George
    Home | Blog

  11. #11
    Join Date
    May 2005
    Posts
    1,191
    Take a look at the DateAdd() function, do like:

    DateAdd("d", -1, Date)
    Me.Geek = True

  12. #12
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Apologies - I mentioned the DateDiff when that's what I really meant

    Or did I mean that because he could then use "See Also" hmm?
    George
    Home | Blog

  13. #13
    Join Date
    Aug 2006
    Posts
    559
    Can anyone tell me why a field in a table will not display in a form?

    I have a field, Task_Description, and trying to display it in a listbox in this reminder form. It's in the query and checked to "show" but when I select the criteria in the list box, either display from table or query, it will not display the field to select it to be shown. It just skips it and shows the rest of the fields.

  14. #14
    Join Date
    Jan 2007
    Location
    California, USA
    Posts
    520
    I think I got a little lost here. Grafixx01, could you post your current SQL string? I think that will help us all get on the same page.
    Thanks!

  15. #15
    Join Date
    Jan 2007
    Location
    California, USA
    Posts
    520
    And now for the next problem. A list box needs it's own query which selects what will be shown in the list box. A list box will list one column from the query, unless you specify that you want others to show. Please give us all the related property values for this list box that refer somehow to the columns in the list box. For example, show us the SQL being used as the RowSource, then show us the number of columns, the width of the columns, the bound column, and anything else that might be related.

Posting Permissions

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