If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Help creating a report. How to implement logic in the report
Hello,
I need to create a report that basically shows employees who have completed something similar to a hiring process. The criteria to indicate that the process has been completed is: 1. The presence of 4 dates in a table. The presence of each date represents the completion of a single phase/stage of the hiring process. 2. Verified access to a number of applications, based on job title. I do something very similar on a form using the OnCurrent event. I check for the presence of each date and increment a counter for each date present. Each job title has a set number of applications that the employee needs. I check the number of apps needed, then compare that to how many apps have been verified. If the two counts are equal (and 0) then all apps have been verified. If all conditions are met, I display a lable indicating the process is complete. My report has all the necessary data, but I need to apply the conditional logic so that I only get the records that meet the criteria. I know this was pretty long-worded, but I wanted to explain this clearly. Can anyone point me in the right direction? TIA, Rich |
#2
|
|||
|
|||
Help creating a report. How to implement logic in the report
rich wrote:
I need to create a report that basically shows employees who have completed something similar to a hiring process. The criteria to indicate that the process has been completed is: 1. The presence of 4 dates in a table. The presence of each date represents the completion of a single phase/stage of the hiring process. 2. Verified access to a number of applications, based on job title. I do something very similar on a form using the OnCurrent event. I check for the presence of each date and increment a counter for each date present. Each job title has a set number of applications that the employee needs. I check the number of apps needed, then compare that to how many apps have been verified. If the two counts are equal (and 0) then all apps have been verified. If all conditions are met, I display a lable indicating the process is complete. My report has all the necessary data, but I need to apply the conditional logic so that I only get the records that meet the criteria. You can use the same logic in the report's detail(?) section's Format event. -- Marsh MVP [MS Access] |
#3
|
|||
|
|||
Help creating a report. How to implement logic in the report
Yes, but how?
There is no OnCurrent event. The only events a OnFormat On "Marshall Barton" wrote: rich wrote: I need to create a report that basically shows employees who have completed something similar to a hiring process. The criteria to indicate that the process has been completed is: 1. The presence of 4 dates in a table. The presence of each date represents the completion of a single phase/stage of the hiring process. 2. Verified access to a number of applications, based on job title. I do something very similar on a form using the OnCurrent event. I check for the presence of each date and increment a counter for each date present. Each job title has a set number of applications that the employee needs. I check the number of apps needed, then compare that to how many apps have been verified. If the two counts are equal (and 0) then all apps have been verified. If all conditions are met, I display a lable indicating the process is complete. My report has all the necessary data, but I need to apply the conditional logic so that I only get the records that meet the criteria. You can use the same logic in the report's detail(?) section's Format event. -- Marsh MVP [MS Access] |
#4
|
|||
|
|||
Help creating a report. How to implement logic in the report
Yes, but how?
The only events a OnFormat OnPrint OnRetreat As I understand the information provided in Access Help, neither of these suffices. The logic that I need to implement is: Dim StepsComp As Integer 'This is the number of steps of the process which are complete. Dim txtVerifiedApplsCount As Integer Dim txtPercentComplete stepsCompleted = 0 txtPercentComplete = 0 txtVerifiedApplsCount = 0 StepsComp = 0 If Not IsNull(txtARFSubmitDate) Then StepsComp = StepsComp + 1 End If If Not IsNull(txtS3IDNotifyDate) Then StepsComp = StepsComp + 1 End If If Not IsNull(txtXEmailSetNotifyDate) Then StepsComp = StepsComp + 1 End If If Not IsNull(txtXEANSetNotifyDate) Then StepsComp = StepsComp + 1 End If txtStepsCompleted = StepsComp txtPercentComplete = (StepsComp / 4) txtVerifiedApplsCount = DCount("*", "tblEmplApplMapping", "S3ID = '" & [txtS3ID] & "' AND [AccessVerified] = TRUE") If ((txtStepsCompleted = 4) And (txtVerifiedApplsCount = txtTotalApps)) Then lblProcessCompleteMsg.Visible = True Else lblProcessCompleteMsg.Visible = False End If Thanks, Rich "Marshall Barton" wrote: rich wrote: I need to create a report that basically shows employees who have completed something similar to a hiring process. The criteria to indicate that the process has been completed is: 1. The presence of 4 dates in a table. The presence of each date represents the completion of a single phase/stage of the hiring process. 2. Verified access to a number of applications, based on job title. I do something very similar on a form using the OnCurrent event. I check for the presence of each date and increment a counter for each date present. Each job title has a set number of applications that the employee needs. I check the number of apps needed, then compare that to how many apps have been verified. If the two counts are equal (and 0) then all apps have been verified. If all conditions are met, I display a lable indicating the process is complete. My report has all the necessary data, but I need to apply the conditional logic so that I only get the records that meet the criteria. You can use the same logic in the report's detail(?) section's Format event. -- Marsh MVP [MS Access] |
#5
|
|||
|
|||
Help creating a report. How to implement logic in the report
rich wrote:
Yes, but how? The only events a OnFormat OnPrint OnRetreat As I understand the information provided in Access Help, neither of these suffices. The logic that I need to implement is: Dim StepsComp As Integer 'This is the number of steps of the process which are complete. Dim txtVerifiedApplsCount As Integer Dim txtPercentComplete stepsCompleted = 0 txtPercentComplete = 0 txtVerifiedApplsCount = 0 StepsComp = 0 If Not IsNull(txtARFSubmitDate) Then StepsComp = StepsComp + 1 End If If Not IsNull(txtS3IDNotifyDate) Then StepsComp = StepsComp + 1 End If If Not IsNull(txtXEmailSetNotifyDate) Then StepsComp = StepsComp + 1 End If If Not IsNull(txtXEANSetNotifyDate) Then StepsComp = StepsComp + 1 End If txtStepsCompleted = StepsComp txtPercentComplete = (StepsComp / 4) txtVerifiedApplsCount = DCount("*", "tblEmplApplMapping", "S3ID = '" & [txtS3ID] & "' AND [AccessVerified] = TRUE") If ((txtStepsCompleted = 4) And (txtVerifiedApplsCount = txtTotalApps)) Then lblProcessCompleteMsg.Visible = True Else lblProcessCompleteMsg.Visible = False End If OnFormat is an Event Property, you want to put your code in the Format event procedure. In a vague sort of way, you can think of a report's Format event as being analogous to a form's Current event. -- Marsh MVP [MS Access] |
Thread Tools | |
Display Modes | |
|
|