+- +-

User

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

Stats

Members
Total Members: 18
Latest: waleedalesayi
New This Month: 1
New This Week: 1
New Today: 1
Stats
Total Posts: 177
Total Topics: 69
Most Online Today: 1
Most Online Ever: 7
(November 10, 2019, 11:10:17 am)
Users Online
Members: 0
Guests: 0
Total: 0

Author Topic: Employee System Example V4 Errors And Corrections  (Read 175 times)

Offline Michael

  • Administrator
  • Full Member
  • *****
  • Posts: 207
  • Location: Margate, Kent, UK
  • Referrals: 0
Employee System Example V4 Errors And Corrections
« on: September 01, 2019, 11:08:09 am »
The following error has been found.

when openning the timesheet as a person without the correct permision it will be sent into a loop as the openning of it is being controled by the load data message the correction is to remove the following lines of code from the time sheet on open event and past in the on open event of the Msgloadingdata form.

Should you need help create a topic and I'll help best I can this topic is for notifcations and corrections only

Code: [Select]
    If Not IsOpen("frmDetectIdleTime") Then
        MsgBox "You must open this object from the main screen", vbExclamation + vbOKOnly, "Missing Object"
        Cancel = True
        Exit Sub
    End If
    'Only Managers or above can view this object
    If Not CheckManager Then
        MsgBox "You must be a manager or admin to view the Works Diary", vbExclamation + vbOKOnly, "insufficient permissions"
        Cancel = True
        Exit Sub
    End If

Past the following into the MsgfrmLoadingData form OnOpen Event

Code: [Select]
On Error GoTo HandleErr

    If Not IsOpen("frmDetectIdleTime") Then
        MsgBox "You must open this object from the main screen", vbExclamation + vbOKOnly, "Missing Object"
        Cancel = True
        Exit Sub
    End If
    'Only Managers or above can view this object
    If Not CheckManager Then
        MsgBox "You must be a manager or admin to view the Works Diary", vbExclamation + vbOKOnly, "insufficient permissions"
        Cancel = True
        Exit Sub
    End If

HandleExit:
    Exit Sub
   
HandleErr:
    Select Case Err.Number
        Case 2501 'Cancel = True
            Exit Sub
        Case Else
            MsgBox Err.Number & vbCrLf & Err.Description
            Resume HandleExit
        Resume
    End Select
« Last Edit: September 01, 2019, 11:14:45 am by Michael »

Share on Facebook Share on Twitter

Love Love x 1 View List

Offline Michael

  • Administrator
  • Full Member
  • *****
  • Posts: 207
  • Location: Margate, Kent, UK
  • Referrals: 0
Re: Employee System Example V4 Errors And Corrections
« Reply #1 on: September 05, 2019, 07:36:43 pm »
Please note the error info relating to the popup calendar

https://www.utteraccess.com/forum/index.php?showtopic=2034523&view=findpost&p=2696360
Love Love x 1 View List

Offline Michael

  • Administrator
  • Full Member
  • *****
  • Posts: 207
  • Location: Margate, Kent, UK
  • Referrals: 0
Re: Employee System Example V4 Errors And Corrections
« Reply #2 on: September 07, 2019, 10:36:55 am »
I was going though my project management system updating the holiday planner to current version when I noticed the holiday report was showing all entries for all years as my project management system goes back a lot of years it was a lot.

so I made the following change to the query: qryHolidayListReport

I added a new field with the expression: HYear: Year([StartDate]) you can call it what you like

And A Criteria: Year([Forms]![frmHolidays]![txtDate])

For those new to access what this does is limits the output of the report to the current year being viewed on the holiday planner, I didn't think it needed a date range popup.

P.S. I used the start date only as I was only interested in holidays starting in a given year.

hope you find this of use mick
« Last Edit: November 17, 2019, 10:59:26 pm by Michael »

Offline Michael

  • Administrator
  • Full Member
  • *****
  • Posts: 207
  • Location: Margate, Kent, UK
  • Referrals: 0
Re: Employee System Example V4 Errors And Corrections
« Reply #3 on: September 14, 2019, 04:57:32 pm »
Just had an error reported this was missed between updates

open frmRequests in design view then edit the row source SQL
You can replace it with the below which points the assigned manager to the hidden form holding the defaults.

Code: [Select]
SELECT tblHolidayRequests.RequestID, tblEmployees.EmployeeID, [FirstName] & " " & [LastName] AS Employee, tblHolidayRequests.StartDate, tblHolidayRequests.EndDate

, tblHolidayRequests.HolidayNotes, tblHolidayRequests.HolidayType, tblHolidayRequests.StartHalfDay,

 tblHolidayRequests.EndHalfDay, tblHolidayRequests.ManagerID, tblHolidayRequests.Approved,

tblHolidayRequests.AssessedDate, tblHolidayRequests.ManagerNote FROM tblEmployees INNER JOIN

 tblHolidayRequests ON tblEmployees.EmployeeID = tblHolidayRequests.EmployeeID WHERE

(((tblHolidayRequests.ManagerID)=[Forms]![frmDetectIdleTime]![txtUser]) AND

((tblHolidayRequests.Approved) Is Null)) ORDER BY tblHolidayRequests.StartDate DESC

, tblHolidayRequests.Approved DESC;


Or just replace the manager ID Criteria with this [Forms]![frmDetectIdleTime]![txtUser] this will point it in the correct place.


plus also noticed the subform was not updating after adding a request so add the following to  frmMain

Replace CmdRequest Code with
Code: [Select]
    DoCmd.OpenForm "frmHolidayRequests", , , , , acDialog
    Me.ZfrmRequests.Form.Requery

« Last Edit: October 04, 2019, 09:59:08 pm by Michael »
Informative Informative x 1 View List

Offline Michael

  • Administrator
  • Full Member
  • *****
  • Posts: 207
  • Location: Margate, Kent, UK
  • Referrals: 0
Re: Employee System Example V4 Errors And Corrections
« Reply #4 on: October 04, 2019, 09:57:23 pm »
On the diary, add meeting Found this error

Don't quite know what I was thinking but corrected now

comment out or remove this text  - NightShift 'M Javes Edit 16/08/2019
from this line  !StartTime = Format(ST & ":00", "h AM/PM") ' - NightShift 'M Javes Edit 16/08/2019

The meeting after adding a new one should open when first created so you can edit it once done close it make sure it is selected in the Active meetings Dropdown
for that day then just double click the time for each employee you wish to attend.

remember you can only get to r add meetings by selecting CODE ENTRY from the entry type list then MEETING from the select a code list.

and meetings only show for the selected date
« Last Edit: October 05, 2019, 10:34:51 am by Michael »

 

+-Recent Topics

Uploaded styles by Michael
December 01, 2019, 03:48:46 pm

Project Status by Michael
December 01, 2019, 02:52:14 pm

READ: exporting charts requirements by Michael
November 25, 2019, 10:41:16 pm

Download Works Manager Lite by Michael
November 22, 2019, 02:21:17 pm

Picture Library Download by Michael
November 21, 2019, 06:15:34 pm

Donate Picture by Michael
November 20, 2019, 10:02:42 pm

Project Status by Michael
November 20, 2019, 06:01:09 pm

Members Deleted by Michael
November 18, 2019, 10:19:17 pm

Updates To Version 1.02 by Michael
November 18, 2019, 05:52:27 pm

Access Error Query is Corrupt by Michael
November 17, 2019, 10:17:22 am