Message Box Reminder

ledmark

Ledmark
Local time
Today, 12:16
Joined
Mar 11, 2008
Messages
127
Hello again - I would like to add two fields to a number of forms:

AttendTask = Specific task that needs to be done - example "Check labs for John Smith"

AttdDoneBy = Specific Date the task is to be done by.

I need to have help in writing code that will accomplish this:

When the current date matches the AttdDoneBy field, I would like the program to look at the PatientName and the AttendTask and put those into a MsgBox that will pop up when the database is opened. This way the user will not miss the reminder if they don't enter that specific form.

Since I don't know very much about writing VBA (but I am learning) I am asking someone to please help me accomplish this task. Is it code that needs to go on each form or will it need to go into a module for the database itself?

I will appreciate any help someone is willing to give me. Thank you ahead of time :)

Laura
 
I'm going to keep trying to get someone to help me with this one because I do believe some one can. Someone please help me.

Laura
 
Here is a good example of this
 
Thank you so much for showing me this. Now my mind starts trying to figure out how this would work in my scenario. The user has seven different forms from which the task entered and Done By date is entered. These forms are used to document different aspects of care for about 180 patients. This example shows how to pull it from a Task table so would I need to write this for each Table?

This example counts record in a single table. Is there a way to modify this coding so that instead of looking at a job number it looks at the patient name and task incomplete. I don't want it to count anything - I want it to just display the patient's name and the task that needs to be done on that day. Does this make sense.

I have no idea how to write it because it entails a different scenario. I don't know VBA so I could spend hours trying to figure out what to put where and have it never work. It has to be so exact.

This is close to what I'm looking for but I need help modifying it.

Laura
 
Khawar - I actually built something just like the example you gave me and it works with everything except when I click the yes button to view the reminders it's supposed to open and go to the frmReminder but it goes to the switchboard first and opens the Reminders form behind the switchboard. Here is the code that was used:

'On Load of the switchboard check Reminder table for any uncompleted jobs
Dim inStore As Integer
'Count of uncomplete jobs that are past the RemindDoneBy
intStore = DCount("[Reminder Number]", "[tblReminder]", "[RemindDoneBy] <=Now() And [RemComplete] =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 view the reminders now?", _
vbYesNo, "You Have Uncomplete Reminders...") = vbYes Then
DoCmd.Minimize
DoCmd.OpenForm "frmReminder", acNormal

Else
Exit Sub
End If
End If
End Sub

This is where (in the red) it doesn't open the Reminders form first if the Yes button is clicked. What can I put in here to make it minimize the Switchboard when the Yes button is clicked?

Thank you!
Laura
 
Hello - I'm not going to give up hope that someone will be able to tell me how I can make the Reminder form open before the Switchboard and upon closing of the Reminder form go to the switchboard. When you click the Yes button that comes from the code it opens both the Reminder form and the Switchboard but the switchboard is on top and you have to click the Reminder form tab to see it - I want to know how I can reverse this.

Any help would be appreciated.

Thanks
Laura
 
It is because the code to open reminders for is on your swithch board transfer that code to the reminders form and then open switch board
 
Well, when I put the code on the Reminders form nothing happens now - it just opened to the Switchboard. This is what the instructions say:

Usually, the first object that is visable when a user opens a database would be a splash screen or a switchboard. With this in mind, we will display a reminder pop-up on opening the database (using the On Load even of the switchboard, which is set to open at StartUp), but prior to displaying the switchboard (if any reminders need to be shown). We do this by adding the following code to the On Load event:

Then he gives the code I wrote above. Maybe I'm just assuming by what's written that the Reminders form opens fully before the switchboard if a reminder is uncomplete. But it just is a Tab behind the Switchboard that you have to manually switch to. I wonder if these instructions were built for 3002 and in 2007 it displays differently?

I guess this is how it has to be. Thanks for your help.

laura
 

Users who are viewing this thread

Back
Top Bottom