PDA

View Full Version : Create a log/journal about each table row?



behedwin
06-01-2017, 02:08 PM
I have a large table with data about my staff.

Now i want to create like a journal system for each staff.

I view, edit and add data to my table from a userform.

When i open my userform and select one of my staff i get all his data imported to the userform.
Now i want to create a new section in the userform, a "log" or "journal" about that specific person.
Like add a row of data and save it to that person, next day ad a new row and still be able to see the data.
The idea is to save this data in a listbox. So each staff have a listbox filled with the data that is about them.

How could i do this?
I cant store all the data in my table, it would get ful quickly if i add a row of text each day to each staff member.

werafa
06-02-2017, 02:22 AM
You will need one table for your comments, with one column per staff member.
Create Dynamic Named Ranges for each column (see http://www.ozgrid.com/Excel/DynamicRanges.htm for my favourite resource on this)
use the named range to populate the list box.

Size the listbox control to show only a set number of entries, and use the scroll bar to find older comments.
Alternatively, archive the first row to a second table once a set size is reached. (cut row 2, and paste to lastrow in archive table, then delete any blank cells (and shift cells up in both cases)

use a separate textbox with its own 'save to first empty row in correct column' routine to add new comments

werafa
06-02-2017, 02:24 AM
If you were to use access, you can create a staff form, and link a comments subform quite easily - and open the subform to the last record