Listbox to select record in Read Only Mode

Cotty42

Registered User.
Local time
Today, 16:08
Joined
Feb 27, 2014
Messages
102
Hi

I have a form which uses a listbox to display a given record but when a user without edit rights opens the form in read only mode
Code:
DoCmd.OpenForm stDocName, , , stLinkCriteria, acFormreadOnly

The user is unable to use the listbox to select a record to view.

I have also tried opening the form in edit mode (acFormedit) and then setting the allowedits etc. to False
Code:
        Me.Form.AllowAdditions = False
        Me.Form.AllowDeletions = False
        Me.Form.AllowEdits = False

But this didn't work either.

Any ideas

Cheers
Dave
 
You can use the list's on enter/on exit event, to change the form's allow edit so they are able select from the list when they enter the list, and on exit to block change.
 
Worked a treat - Thanks for your help

Dave
 

Users who are viewing this thread

Back
Top Bottom