Dear Jeff
Thanks for your reply.
I have tried to work out a simple solution based on your third option. So
I
put on the form a hidden textbox that reads the user name and stores it.
Then for every textbox or combobox of the form records (displayed in
continuous form view) I used conditional formatting to check if the
expression [RecordUserName]<>Form!FormName!txtCurrentUserName
is valid and enable it or not.
Unfortunately this doesn't work and records stay always enabled. Do you
have
an explanation?
Regards
George
Jeff Boyce said:
One approach would be to add code in the form's BeforeUpdate event that
checks the user's UserName against what was stored for the row and
cancels
(?with a message) if they don't match. This has the disadvantage of
forcing
the user to complete his/her action and attempt the save/deleted before
being advised.
Another approach would be to only display a user's records (in the
underlying query, select by UserName...). The disadvantage here is that
the
user may need to see/read all the messages, not just his/hers.
Yet another possibility would be to create a more general test (is THIS
user
the UserName that's recorded) when the form opens, and use the results as
a
boolean value to cycle through all the controls on the form, setting the
Enabled property to the boolean value. This would prevent any changes,
but
"costs" you the time to develop it.
Regards
Jeff Boyce
Microsoft Office/Access MVP
Hi,
I have multi user database form where a record field takes
automatically
its
value from the GetCurrentUserName() functions on the On Dirty event.
I want the user who opens the form to be able to edit or delete only
the
records that have registered his/her name in the certain field.
Do you have any idea how?
thank you
GL