User history: last five accessed records

Thirith

Board Regular
Joined
Jun 9, 2009
Messages
115
For a database I'm working on at work, I've been asked whether it'd be possible to implement something along the following lines: a drop-down box that lists the last 10 accessed records for a user. It doesn't matter whether they were edited, as we often consult the database for information, and I don't even think the list of recent records would need to be stored beyond the current session (though if it was, that'd also be okay).

I have a couple of ideas - pretty vague ones right now, since I've only just arrived at the office and I've got a heap of other things to get through, as Access isn't really what I was hired to do - but I was thinking that this might be the kind of function that is requested or used quite frequently, so I wanted to ask the community here if you have any pointers for me. I've done a Google search, but I wasn't particularly successful.
 

Some videos you may like

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.

stumac

Active Member
Joined
Jul 16, 2010
Messages
471
Seen this done a couple of ways, probably the most straight forward is on the 'on open' event, append a record to a history table - (UserID, RecordID and a way of sorting them - current Date & time or AutoID).

Then just have the row source of the combo as select top 5 query with the criteria being the active user.

Another way I have seen it done is using the registry to store the information... It means that if a user accesses from different machines the list they see will be different. It is also cumbersome as you need to either shift the records each time or bring them into code ans sort them. It can be quite a good method for storing machine specific settings though.
 

Thirith

Board Regular
Joined
Jun 9, 2009
Messages
115
Thanks, those are good starting points. One thing I was wondering: even though we're obviously a split database, is it possible to add a user-specific table to the front-end?
 

stumac

Active Member
Joined
Jul 16, 2010
Messages
471
Yeah - it is quite common to have at least one user specific table in the FE - this is often used to check the version of the FE matches the latest version. Holding the history there would be ok, however, it does mean using different machines would show different history (similar to the registry method).
 

Thirith

Board Regular
Joined
Jun 9, 2009
Messages
115
Thanks, that's useful to know. It shouldn't be a problem in our case, as we tend to have personalised, tweaked FEs that are stored on a network drive, so people would have the same history regardless of the PC they're accessing the DB from. (It's quite possible that some or all of this goes against Access best practices, but we're all self-taught dabblers in Access... ;))
 

Watch MrExcel Video

Forum statistics

Threads
1,096,458
Messages
5,450,574
Members
405,619
Latest member
mjh237

This Week's Hot Topics

Top