Selasa, 03 September 2013

[MS_AccessPros] Forms, not for everybody!

 

Hi all, I would like to submit this question, I suppose can be useful to many...
I've a 2003 mdb where I would like to give access to some subfoms depending on the network access name..

so let me define to let u understand:

MAINFORM --> contains subform_1 and subform_2
I log network access using =fOSUserName() and I collect all them (where they browse, how long etc)

Subform_1 is show to everybody
Subform_2 only to somebody
Subform_2 is set as hide

on MainForm load vba is:
If ([fOSUserName]) = "USER_1" Or [fOSUserName] = "USER_2" Then Form.[Subform_2].Visible = True Else Form.[Subform_2].Visible = False

OK, it works like a clock :-)

Now I've these user_1,2,3,4,5... in a table, or better in a query where I can set users allowed to see Subform_2...
How can I code the procedure and loop to read the user name and avoid to write down all users who can see the Subform_2?
Loop is one of my main problem!

Thanks to the holy people who help access no-skilled people like me... :-)
have a nice evening
Luigi

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar