Hi, I have an unbound form comprised of at least 7 subforms but only 2 are visible.
This is for timesheet data where a time shouldn't exceed 60 hours over 7 days or 70 hours over 8 days(trucking operation)
Data is pulled from these based on data entered in subfrm1. Subfrm2 shows data for the last 7 days based on the date entered in subfrm1 and then a control on the unbound form, text1, shows the total hours for the previous 7 days.
The problem is that the data is entered the following morning, so I need the subform not to show (dateworked - 1) - 7 but the current date being entered and the previous 6 which would take the hours just entered into consideration. I have tried the requery command and I know my syntax is right because the form refreshes and it worked just fine before having to make this change, however the current record doesn't show up. I can see the control that drives the underlying query for subfrm2 and it is the correct date, say 7/8/2004, but the subform only shows 7/3/2004 and before.
I've tried accmdsave to save the record then requery the subform but it doesn't work either BUT when I open the query that is the record source of subfrm2 manually the current record shows up. All my commands take place in the Timeout control's on lost focus event (after update doesn't work because we have to enter no time for weekends which shows 0 hours worked) Any suggestions? I appreciate any help you can provide.
This is for timesheet data where a time shouldn't exceed 60 hours over 7 days or 70 hours over 8 days(trucking operation)
Data is pulled from these based on data entered in subfrm1. Subfrm2 shows data for the last 7 days based on the date entered in subfrm1 and then a control on the unbound form, text1, shows the total hours for the previous 7 days.
The problem is that the data is entered the following morning, so I need the subform not to show (dateworked - 1) - 7 but the current date being entered and the previous 6 which would take the hours just entered into consideration. I have tried the requery command and I know my syntax is right because the form refreshes and it worked just fine before having to make this change, however the current record doesn't show up. I can see the control that drives the underlying query for subfrm2 and it is the correct date, say 7/8/2004, but the subform only shows 7/3/2004 and before.
I've tried accmdsave to save the record then requery the subform but it doesn't work either BUT when I open the query that is the record source of subfrm2 manually the current record shows up. All my commands take place in the Timeout control's on lost focus event (after update doesn't work because we have to enter no time for weekends which shows 0 hours worked) Any suggestions? I appreciate any help you can provide.