BrisAdrian
New Member
- Joined
- Sep 5, 2015
- Messages
- 22
Hello I'm trying to remove the potential of people messing up a database I've created when adding new employee details. This this end I've added a 'front page' type of set up that allows users to perform certain functions and will protect my database from user error.
Here is a miniature version of the database I'm using:
https://app.box.com/s/6e91emeyruqlkhgkdmmqlvrc8kvpwisu
My intent is for data to be entered into the sheet "Form" in cells B37 to AL37.
Then the "Add employee" button will search column "A" in the "Master" sheet for a match.
If a match exists an error message will pop up saying "This employee already exists"
If there is no match, the Employee ID number is added to the bottom of the Master list. From there the other fields from the New Employee Data series are added in sequence to the Employee ID number.
If my upload contains the code, there's some basic stuff I've worked in, but as I try to build more functionality into it I keep running up against a wall. Any help would be very much appreciated.
As an added request, I'm trying to retrieve the test results & dates, in revers from the master Data sheet and add them to the "Form" sheet when someone wants to "get history". So that AI14 will display the most recent date, AK14 the most recent result and any subsequent results are displayed in descending order up the whatever is in the "T" and "U" columns in the master data . This is so that I can provide employee's with a Graph representation of their results for easier comprehension.
What the sheet currently does:
Entering an existing employee's number in to G5 will bring up the available details, Entering data into G15 and G17 and then pressing "Update Results" will automatically populate the next 2 empty columns that correspond to that persons employee ID.
The "Clear Form" buttons reset the fields on the "Form" page.
The Previous results lookup lets you view the most recent result + date, the previous results, the difference between the two and the next test due date.
This may be of benefit to someone else who wishes to use the sheet. I've tried to add in explanations in the VBA codes so hopefully others can make use of it. However the "Update results" code is beyond my comprehension so if you are having trouble with that, I apologize.
Kindest Regards,
Adrian
Here is a miniature version of the database I'm using:
https://app.box.com/s/6e91emeyruqlkhgkdmmqlvrc8kvpwisu
My intent is for data to be entered into the sheet "Form" in cells B37 to AL37.
Then the "Add employee" button will search column "A" in the "Master" sheet for a match.
If a match exists an error message will pop up saying "This employee already exists"
If there is no match, the Employee ID number is added to the bottom of the Master list. From there the other fields from the New Employee Data series are added in sequence to the Employee ID number.
If my upload contains the code, there's some basic stuff I've worked in, but as I try to build more functionality into it I keep running up against a wall. Any help would be very much appreciated.
As an added request, I'm trying to retrieve the test results & dates, in revers from the master Data sheet and add them to the "Form" sheet when someone wants to "get history". So that AI14 will display the most recent date, AK14 the most recent result and any subsequent results are displayed in descending order up the whatever is in the "T" and "U" columns in the master data . This is so that I can provide employee's with a Graph representation of their results for easier comprehension.
What the sheet currently does:
Entering an existing employee's number in to G5 will bring up the available details, Entering data into G15 and G17 and then pressing "Update Results" will automatically populate the next 2 empty columns that correspond to that persons employee ID.
The "Clear Form" buttons reset the fields on the "Form" page.
The Previous results lookup lets you view the most recent result + date, the previous results, the difference between the two and the next test due date.
This may be of benefit to someone else who wishes to use the sheet. I've tried to add in explanations in the VBA codes so hopefully others can make use of it. However the "Update results" code is beyond my comprehension so if you are having trouble with that, I apologize.
Kindest Regards,
Adrian