Hello all,
We have a timesheet report for all of the employees. The report is a real work of art. I have done a really splendid job with it. But there is one final issue that bothers me. The user is prompted to enter a Pay Period ending date. for the timesheet to populate. Because the report can be printed anytime and for any date range, the report is set up in the following way. The prompt for a date puts the dates on the timesheet based on the pay period end date, adding 1 to each of the days. All is working exactly the way we need it to except when there is a holiday or a special day they want to flag which can be random. There is a text box that is on the timesheet that is populated based on the second prompt for the report. So the user can type whatever they want and it shows on the timesheet. The issue is that they have to manually move the text box on the timesheet for the particular date on the timesheet.
Here is my thought or solution. But it is not working out.
I put a text box on the form to bypass the prompts for Pay Period end date and Holiday. I then put a select case on the On Current event of the report to move the text box to a specific location based on the text entered on the form. I am using a test Form1 so as not to mess with the main form. As soon as I figure this out I will change the Form Name.
I used this technique on a form based on clicking a button and the text box moved where I needed, so I know it works on forms.
Thank You for any guidance you may offer.
Jim Wagner
Private Sub Report_Current()
Select Case Forms!Form1.txtEnterHolidayDate.Value
Case Is = "Monday"
Me!txtHoliday.Top = 1559
Me!txtHoliday.Left = 1860
Me!txtHoliday.Value "Holiday"
Case Is = "Tuesday"
Me!txtHoliday.Top = 1559
Me!txtHoliday.Left = 2940
Me!txtHoliday.Value "Holiday"
Case Is = "Wednesday"
Me!txtHoliday.Top = 1559
Me!txtHoliday.Left = 4079
Me!txtHoliday.Value "Holiday"
Case Is = "Thursday"
Me!txtHoliday.Top = 1559
Me!txtHoliday.Left = 5219
Me!txtHoliday.Value "Holiday"
Case Is = "Friday"
Me!txtHoliday.Top = 1559
Me!txtHoliday.Left = 6540
Me!txtHoliday.Value "Holiday"
Case Is = "Saturday"
Me!txtHoliday.Top = 1559
Me!txtHoliday.Left = 7739
Me!txtHoliday.Value "Holiday"
Case Is = "Sunday"
Me!txtHoliday.Top = 1559
Me!txtHoliday.Left = 8999
Me!txtHoliday.Value "Holiday"
End Select
End Sub
Posted by: luvmymelody@yahoo.com
| Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (1) |
Tidak ada komentar:
Posting Komentar