Results 1 to 10 of 10

Thread: Reminder (2003)

  1. #1
    5 Star Lounger
    Join Date
    May 2003
    Location
    Sheffield, Yorkshire
    Posts
    951
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Reminder (2003)

    I have a database in which I have a table & form, which holds details of items to be calibrated. We are finding that some things are running out of calibration because the person responsible, isn't looking at the database to see what's due. Is there a way of opening up a form showing what's due for the week, as soon as he logs on to the computer.

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

    Re: Reminder (2003)

    1) Design a query and a form to display a list of items due.
    2) Make this form the startup form for this user's frontend database (in Tools | Startup...)
    3) Put a shortcut to the frontend database in this user's Startup folder for Windows (Cocuments and Settings<username>Start MenuProgramsStartup).

  3. #3
    5 Star Lounger
    Join Date
    May 2003
    Location
    Sheffield, Yorkshire
    Posts
    951
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Reminder (2003)

    Thanks Hans. We are still expierencing IT problems, so it will have to wait, but your suggestions always work.

  4. #4
    5 Star Lounger
    Join Date
    May 2003
    Location
    Sheffield, Yorkshire
    Posts
    951
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Reminder (2003)

    I've created a query, and a form that runs from it, and used code to pop up a message box if there are outstanding items.I put code :-
    intStore = Nz(DCount("*", "qryNotification"), 0) <> 0

    on the OnLoad event of the Switchboard, and used

    Between Date() And DateAdd("d",5,Date()) as the criteria for the query. Everything seems to work ok, but the message that pops up tells me I have -1 uncompleted jobs. At the moment there is one outstanding job. How do I get a minus figure. Also, I think I have it set to give me the current months outstanding, I would like it to give me ALL outstanding, as they have a tendency to fall behind a little.

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

    Re: Reminder (2003)

    What do you show in the mesage box? The value of intStore? That will either be -1 (True) if the DCount is non-zero, or 0 (False) if the DCount is zero.

    You'll have to provide sufficient info about the other question.

  6. #6
    5 Star Lounger
    Join Date
    May 2003
    Location
    Sheffield, Yorkshire
    Posts
    951
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Reminder (2003)

    I was hoping to show the quantity outstanding, but I must have got something wrong. Here's the code:-
    Private Sub Form_Load()
    'On Load of the switchboard check Jobs table for any uncompleted jobs

    Dim intStore As Integer

    'Count of uncomplete jobs that are past the Expected Completion Date
    intStore = Nz(DCount("*", "qryNotification"), 0) <> 0
    'If count of uncomplete jobs is zero display switchboard
    'Else display message box detailing amount of jobs
    'and give the user the option as to whether to view these or not.
    If intStore = 0 Then
    Exit Sub
    Else
    If MsgBox("There are " & intStore & " uncompleted jobs" & _
    vbCrLf & vbCrLf & "Would you like to see these now?", _
    vbYesNo, "You Have Uncomplete Jobs...") = vbYes Then
    DoCmd.Minimize
    DoCmd.OpenForm "frmCalibrations Due", acNormal
    Else
    Exit Sub
    End If
    End If
    End Sub

    With regards to the other question, this code is supposed to tell me what items are due for calibration, this month. I know that next month, some will be outstanding and will not show up, because they won't be in the current month. I would like to show these also.

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

    Re: Reminder (2003)

    As I noted in my previous reply, you calculate intStore as if it is a True/False value. Try this instead (I removed some superfluous code):

    Private Sub Form_Load()
    ' On Load of the switchboard check Jobs table for any uncompleted jobs
    Dim intStore As Integer
    'Count of uncomplete jobs that are past the Expected Completion Date
    intStore = DCount("*", "qryNotification")
    ' If count of uncompleted jobs is greater than zero,
    ' display message box detailing amount of jobs
    ' and give the user the option as to whether to view these or not.
    If intStore > 0 Then
    If MsgBox("There are " & intStore & " uncompleted jobs" & _
    vbCrLf & vbCrLf & "Would you like to see these now?", _
    vbYesNo + vbQuestion, "You Have Uncompleted Jobs...") = vbYes Then
    DoCmd.Minimize
    DoCmd.OpenForm "frmCalibrations Due"
    End If
    End If
    End Sub

    Try changing the date criteria in the query to

    >Date()

    If that doesn't do what you want, you'll *really* have to provide more info.

  8. #8
    5 Star Lounger
    Join Date
    May 2003
    Location
    Sheffield, Yorkshire
    Posts
    951
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Reminder (2003)

    It's sort of working. I put in another item for March, and the query somehow picked one up due in September, so I think the query wants looking at, but the overall notification code is working. Thanks for that Hans, much appreciated.

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

    Re: Reminder (2003)

    If you want help with the query, we'll have to know exactly what it does.

  10. #10
    5 Star Lounger
    Join Date
    May 2003
    Location
    Sheffield, Yorkshire
    Posts
    951
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Reminder (2003)

    I've sorted it, thanks Hans. Putting in >Date() missed it out because of the date entered. 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
  •