• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 671
  • Last Modified:

How can i create a reminder in Access!?

How can i create a reminder in access to remind the responsible employee.. for example, the order or task deadline is on 16/april.2009. an email or a popup message will start every time he logs into the file or an email would be sent to him..

0
mwael
Asked:
mwael
1 Solution
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
How do you determine the ResponsibleEmployee, and how do you "match" that person to the person currently viewing the database? You can get the Windows Username of the machine the user is using, but if you do not have those Usernames matched to the ResponsibleEmployee, then there's no way for Access to know which of your Employees is logged in.

If you could tell us a bit more about your setup, we could help further.

FWIW, it's pretty simple to show a message to the user:

Msgbox Me.TaskName & " is due on " & Me.TaskDueDate & " and has been assigned to you."

Something like this could be run from a Form (the Me.TaskName and Me.TaskDate are fictitious names; you'd have to change them to match your project).
0
 
mwaelAuthor Commented:
yes im assigning a user name and pass for every user and im creating a table for our employee.but still hinking how to link that :S
0
 
Eric ShermanAccountant/DeveloperCommented:
Here's one approach ...

1.) Build a Task Table that has the user name, task and task details (date created, date due, etc.).

2.) Build a Reminders form where the Record Source is your Task Table and set it to Modal so that it will keep the focus until closed.

3.) Set an Open Event of your main form to open the Reminders form with a where clause ... "[user_name]='" & CurrentUser() & "'"

This will open the Reminders showing all tasks that has been assigned to the current user each time he/she opens the application.  The Modal setting will force them to close the reminder before they can continue.

Just an idea ...

ET
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
NicholasSmithCommented:
if you have MS Access installed, what email tool are you using? Is it MS Outlook? If so then I can provide some code to automate the creation of calendar events
0
 
mwaelAuthor Commented:
yes im using ms outlook
0
 
NicholasSmithCommented:
you'll need to reference the msoutl.olb object from your MS Office directory in program files first. if you get any problems with this then let me know
Public Sub AddCalendarEvent(ByVal datDateToCall As Date, ByVal strSubject As String, ByVal strRetailerName As String, _
 ByVal strContactName As String, ByVal strPhoneNumber As String)
  Dim objOutlook      As Outlook.Application
  Dim objNameSpace    As Outlook.NameSpace
  Dim objFolder       As Outlook.MAPIFolder
  Dim objAppointment  As Outlook.AppointmentItem
  
  'If you start Microsoft Outlook, run a second program that accesses Outlook, and then exit Outlook while
  'you still have the second program running on your computer, you may receive an error message that is
  'similar to the following: The remote server machine does not exist or is unavailable (error 462)
 
  On Error Resume Next
  Set objOutlook = Outlook.Application
  
  If Err.Number = 462 Then
    'reinitializes the Outlook object model if above error occurs
    Set objOutlook = CreateObject("Outlook.Application")
    Err.Clear
  End If
  
  On Error GoTo err_AddCalendarEvent
  Set objNameSpace = objOutlook.GetNamespace("MAPI")
  'Set objFolder = GetOutlookCalendarFolder
  
  Set objAppointment = objOutlook.CreateItem(olAppointmentItem)
  With objAppointment
    .ReminderMinutesBeforeStart = 0
    .Start = datDateToCall
    .End = datDateToCall
    .Subject = strSubject & ": " & strRetailerName
    .Body = "Please Call..." & vbCrLf & vbCrLf & _
     "Retailer: " & strRetailerName & vbCrLf & _
     "Contact Name: " & strContactName & vbCrLf & _
     "Phone Number: " & strPhoneNumber 
    .Save
  End With
  
exit_AddCalendarEvent:
  On Error Resume Next
  Set objAppointment = Nothing
  Set objOutlook = Nothing
  Set objNameSpace = Nothing
  Set objFolder = Nothing
  Exit Sub
  
err_AddCalendarEvent:
  MsgBox Err.Number & " " & Err.Description, vbCritical + vbOKOnly, "Error creating Calendar Event"
  Err.Clear
  Resume exit_AddCalendarEvent
End Sub

Open in new window

0
 
mwaelAuthor Commented:
so this where should i put it? in a new module?or what?
0
 
NicholasSmithCommented:
it would go in a new module if you want to access it from other forms or subroutines
0
 
mwaelAuthor Commented:
ok i inserted it into new module
then?
0
 
mwaelAuthor Commented:
im so bad in modules amcros and codes
0
 
NicholasSmithCommented:
The line:

AddCalendarEvent date(), "call Back", "Joe Bloggs Enterprises", "Mr Bloggs", "0800 100 100"

would then add the record using the above parameters from any piece of code.

NOTE: you do need a reference to MSOutl.olb which is found in the Office10 directory of your Microsoft Office installation
0
 
mwaelAuthor Commented:
:S
 
please can we do it step by step?
ok.. o add the first codes in a module.. then i have to add the above line to it?
so afterthat the reponsiple employee will recieve an email automaticlly?
0
 
NicholasSmithCommented:
if you are unsure how to implement the above code into an application then what i'd be doing is pretty much writing it all for you which would then become a larger task as opposed to offering some guidance in the right direction.
0
 
mwaelAuthor Commented:
then?
it ok.. u can do it! i need only tips
 
i refrenced the outlook in access.. and i inserted the codes in the module
 
then?
0
 
NicholasSmithCommented:
if you inserted the code in to your modules and referenced the outlook object then the line:

AddCalendarEvent date(), "call Back", "Joe Bloggs Enterprises", "Mr Bloggs", "0800 100 100"

would add a call back for today for Mr Bloggs of Joe Bloggs Enterprises to call back on 0800 100 100.

obvuiously you would use your own parameters based on whatever criteria you are using.

this call back is added to microsoft outlook into the calendar and will prompt the user as a normal calendar event would. there is no further help that you need
0
 
mwaelAuthor Commented:
ok thnx dear.. :)
0
 
mwaelAuthor Commented:
it keeps giving me error!
 
i called the module i built but..
0
 
mwaelAuthor Commented:
r u sure it sends email to responsiple employee?
0
 
NicholasSmithCommented:
it wont create an email but would pop up as a calendar event on the outlook of the person who created the event
0
 
mwaelAuthor Commented:
aha... great.. but i have many many may users.... will that be possible in this case?
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now