How do I limit users to seeing only one record on a form?

B

bgarey

I have a form that users will enter 1 record at a time. I do not want the
users to see any other records but there own. I know how to lock controls, so
that they can only edit information that I want them to.
I know how to take out record selectors and navigation buttons.
But using the scroll on the mouse, the user can see all records. How can I
block this?
 
R

Rick Brandt

bgarey said:
I have a form that users will enter 1 record at a time. I do not want
the users to see any other records but there own. I know how to lock
controls, so that they can only edit information that I want them to.
I know how to take out record selectors and navigation buttons.
But using the scroll on the mouse, the user can see all records. How
can I block this?

Bind the form to a query with impossible filter criteria...

SELECT * FROM TableName WHERE 1 = 0

The form will be usable to enter new records, but will have no facility for
displaying existing ones. You could do the same with a filter, but filters
can be removed. In fact if you issue a Requery on the form in the
AfterInsert event the user will even lose the ability to see the records
entered in the current session. As soon as the record is saved it will
vanish and the form will revert to a blank ready for the next entry.
 
R

Rick B

Have you tried setting the form's data entry property to true?

I think this will do what you want.

It will let them see all the records they have added since they opened the
form (so they can fix a mistake in the same "session". But once they close
and reopen the form, they will not be able to see any stored records.

Rick B
 
R

RSC

If you have a field that tracks the user name who entered
the record (lets say you called it "entered by"), you can
simply make the form tied to a query that filters the
records based on the current user.
Criteria for the "entered by" field in the query would
be "=currentuser()"
 
R

RSC

Thats ok, if all you want to do is enter "new"
records....but if you want to have a User see any and all
records, that only he or she has entered, the previous
method I outlined would be more appropriate.
 
Top