Preventing duplicates is hindering date/time stamps

lmac

Board Regular
Joined
May 12, 2005
Messages
103
I have a data entry form that tracks employee work date, start and end time (and other data) that opens to blank form only to prevent users from seeing anyone else's records. I've setup the start & end time fields (after update property) to log the system date/time in hidden fields. I setup the form to prevent duplicates based on the work date & user name (2 primary key fields). The problem is that the user is required to log their name, work date & start time at the beginning of their shift & their end time at the end of their shift. If the form only opens to a blank form and no duplicates are allowed, how can they enter their end time at the end of their shift. I have an edit timecard form that opens their previous timecards in datasheet view that they can edit previous cards but if they use this, the system date/time will not be stamped on the End Time field. Any suggestions on how to work around these options? Perhaps a way for the user to only open their records when they access the main time entry form.
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
One option is to have a field called CreatedBy, which is automatically stamped with the user's name. In the Default Value property for the field in table design view, put =Environ("username"). This will insert the user's Windows login name in the field.
When the form opens, you can filter it to display only records where this field matches Environ("usename").

Denis
 
Upvote 0

Forum statistics

Threads
1,214,377
Messages
6,119,182
Members
448,872
Latest member
lcaw

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top