Joan Wild: I Need Your Help

G

Guest

Joan,


After following instructions at http://www.jmwild.com/security02.htm I have
my FE secured and working. Now, what I would like to do is make a copy of
the original FE but change the main forms background image to something
different.

In other words, I want two FE's that use the same workgroup file but they
have different looking form backgrounds. Is this possible?

-Alias
 
G

Guest

Hi Joan,
If your real intent is to have a different background based on what user
logs in, you can have just one frontend and do this in some startup code.

That sounds really cool. Can you show me what the code looks like to do this
if I have two users named Amanda Simmons and Ken Malkovich?

-A
 
J

Joan Wild

Each section of a form has a BackColor property. So you need to set each.

You can check who the current user is by using the CurrentUser() function in
the Open event of your startup form.

Select Case CurrentUser()
Case "Amanda Simmons"
Me.FormHeader.BackColor = -2147483633
Me.FormFooter.BackColor = -2147483633
Me.Detail.BackColor = -2147483633
Case "Ken Malkovich"
Me.FormHeader.BackColor = -2147483644
Me.FormFooter.BackColor = -2147483644
Me.Detail.BackColor = -2147483644
Case Else
etc.
End Select

You could also do this based on group membership instead of CurrentUser.
There is a function in the security FAQ you can use to determine if a user
is a member of a group.

I personally don't think this is a good idea. You should leave user's
preferences for colours and schemes up to them.
 
G

Guest

Hi Joan,

Your code is awesome. I think I can modify it to load some custom
backgrounds I created instead of changing colors. At any rate you are the
best. I've seen your other posts throughout this forum and you can hang with
the best of them. Thanks a million Joan and I hope Microsoft pays you like a
millionaire :)

-A
 
J

Joan Wild

Thanks for you kind words. Just a clarification though; Microsoft doesn't
pay me (or anyone) here. We volunteer our time to help out others.
 

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