Help with AllowEdits

A

Al

I have a form with tabbed pages (3 tabs). Is there a way to allow users based
on their security level that is assigned to them to edit or not edit per
tabbed page. ex:

User1 has seclvl = 1
he can edit the entire forms so AllowEdits = True for user1

user2 has seclvl = 2
I want him to only be able to edit page1 and page3 but not page2

user3 has seclvl = 3
I want him to only be able to edit page2 but not 1 and 3.

is there a way to allow or disallow editing per page instead of enabling or
disabling each control on the page for each case like what I have now?

thanks
 
M

Marshall Barton

Al said:
I have a form with tabbed pages (3 tabs). Is there a way to allow users based
on their security level that is assigned to them to edit or not edit per
tabbed page. ex:

User1 has seclvl = 1
he can edit the entire forms so AllowEdits = True for user1

user2 has seclvl = 2
I want him to only be able to edit page1 and page3 but not page2

user3 has seclvl = 3
I want him to only be able to edit page2 but not 1 and 3.

is there a way to allow or disallow editing per page instead of enabling or
disabling each control on the page for each case like what I have now?


AllowEdits applies to the entire form. It can not be used
for just part of the form.

OTOH, you can use the Enabled or Visible properties to
enable/disable or show/hide a tab control page. E.g.

Me.TabCtl4.Pages(0).Enabled = (seclvl = 1 Or seclvl = 2)
Me.TabCtl4.Pages(1).Enabled = (seclvl = 1 Or seclvl = 3)
Me.TabCtl4.Pages(2).Enabled = (seclvl = 1 Or seclvl = 2)
 
A

Al

Thanks Marshall, worked well
Al

Marshall Barton said:
AllowEdits applies to the entire form. It can not be used
for just part of the form.

OTOH, you can use the Enabled or Visible properties to
enable/disable or show/hide a tab control page. E.g.

Me.TabCtl4.Pages(0).Enabled = (seclvl = 1 Or seclvl = 2)
Me.TabCtl4.Pages(1).Enabled = (seclvl = 1 Or seclvl = 3)
Me.TabCtl4.Pages(2).Enabled = (seclvl = 1 Or seclvl = 2)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top