One way I could think of doing this would be to have a table which writes the record ID (ie. autonumber field number) and username (from the getuser routine posted in the code bank), and the date/time.
When a user opens the form to a specific record, have it (perhaps in the OnOpen event of the form), write to this table with that info. This would be to keep track.
Then you may also want to have a field in the actual data table (ie. Yes/No type) which marks it as Yes for that record when the form is opened (on that record) and then marks it as No when the form is closed. If another user is opening the form on that record, you could have a routine (or simple dlookup command) to see if that field is marked as Yes/True. If so, then present your message that the record is currently being edited by another user and locked.
Last edited by pkstormy; 06-01-09 at 21:33.
Expert Database Programming
MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)