locking data after input

lipin

Registered User.
Local time
Today, 23:14
Joined
May 21, 2002
Messages
149
I have an application to track employee attendance. On one main form a supervisor picks his name from a dropdown, and they enter the date. On the subform, all of his/her employees show up in datasheet view and the date is included in each record on the subform. There are a couple other records to enter attendance, time, etc.

Once a supervisor enters a day's worth of data and clicks save button. I do not want them to be able to go back and change anything. If they run it again for the same date, we could end up with more than 1 record per employee per day and they might not enter same info. So I end up with all kinds of "extra records" and won't know which is original submission.

Basically if the supervisor already submitted the days, I don't want them to be able to do that day again. Is there any way to lock that day out for that supervisor?

Any suggestions?
 
If I understand what you are saying you should be able to change the properties of the subform to allow additions but not allow edits or deletions. In the properties of the form there are some selections take a look at them and see if that gets you what you want.

GumbyD
 
Well, I tried the allow edits, deletions, additions, properties but that is not giving the needed results.

I will try to be clearer. The date on the form is defualt to current day, and the supervisor selects their name from a drop down to bring up a list of employees in their department on the subform. The subform displays name and ID # and then the supervisor enters info into 3 blank fields for that employee.

They click close button and save. They are using this for daily data entry not to query past info.

So basically if supervisor has entered Mondays data, that's it, they can't be able to go back and redo Monday two days later. Or even 2xs on Mon.

I need some kind of check to see if this supervisor has already entered Mondays daily info they can't change the date on the form and try to redo Monday. But they must be able to change the date in case they were gone for two days and need to go back and enter past days' data.

Still need help. Hope I was clear.
 
Take a look at the attached and this should work for your situation.

GumbyD
 

Attachments

  • formproperties.jpg
    formproperties.jpg
    60.2 KB · Views: 214
Thank you GumbyD. I understand your reply, however, I think I have been asking the wrong question.

Basically I need to prevent duplicate records. If this department has been run for a day then I need to prevent that department from being run again.

I need to test and see if there are records already in the table for any particular supervisor on any particular day when they select their department on the drop down.

I am not trying to look back at what already entered and displaying that on the subform.
All records that show on the subform should be and are blank except for employee names and IDs.
 
OK - different issue then! How are your keys step up on your table? How are you currently determining available entry dates? Do you have a table of entry dates or it is just "anything not currently in the table but after a certain date?" If you had a table of valid entry dates for the combo box and a dual key on the main data table you could set up you row source query to show only the dates that were not currently in the main data table but were in the available dates table - and you could specifiy the supervisor with criteria from the form. It would be fairly easy on a main form -- sub form realationship. Let me know how your tables are set up.

GumbyD
 

Users who are viewing this thread

Back
Top Bottom