Question Redirect On Open (1 Viewer)

Trevor G

Registered User.
Local time
Today, 04:07
Joined
Oct 1, 2009
Messages
2,341
Hi I have been toying with an idea for a while and want to see if this easily managable.

I have a table which lists peoples names, uses there WindowsID and also has a list of permissions ranging from 1 to 3, 1 is novice, 2 is user and 3 is either super user or manager.

I have created 3 forms for each level.

What I would like to aim for is that when the database is opened, there is a check to see who has opened the database through the windowsID and check which permission they have and therefore it opens the correct form, so example

Trevor opens the database it checks my windowsID and directs me to frmUserLevel3

Paul opens the database it checks his windowsID and directs him to frmUserLevel2

Jack opens the database it checks his windowsID and directs him to frmuserlevel1 (I haven't added Jacks details to the attached database as yet)

I will add the necessary code to say if they aren't listed an email will be sent to the developers, which I already have.

I have attached a very basic database which has the staff table and the 3 forms in.

If anyone can assist on this thread I would be very grateful.
 

Attachments

  • security Sample.zip
    14.9 KB · Views: 130

vbaInet

AWF VIP
Local time
Today, 04:07
Joined
Jan 22, 2010
Messages
26,374
I haven't had a look at your db yet but here are some ideas.

Do you have a splash screen? You could use that to handle those events using IF and DLookup. You would need a timer interval of about 1000 or 3000.

If you don't have a splash screen, you can create a form and set it's visible property to false. Do the checks on that form and close it. A timer is also needed.

If you're good with AutoExec macros, you could use that too.
 

SOS

Registered Lunatic
Local time
Yesterday, 20:07
Joined
Aug 27, 2008
Messages
3,517
Check out the revised sample. (uses AutoExec Macro, and two functions).
 

Attachments

  • security Sample_RevBB.zip
    18.6 KB · Views: 117

Trevor G

Registered User.
Local time
Today, 04:07
Joined
Oct 1, 2009
Messages
2,341
Thank you,

I will review this and I am sure this will prove very useful.

Thank you for reading and responding to my thread.
 

Trevor G

Registered User.
Local time
Today, 04:07
Joined
Oct 1, 2009
Messages
2,341
I haven't had a look at your db yet but here are some ideas.

Do you have a splash screen? You could use that to handle those events using IF and DLookup. You would need a timer interval of about 1000 or 3000.

If you don't have a splash screen, you can create a form and set it's visible property to false. Do the checks on that form and close it. A timer is also needed.

If you're good with AutoExec macros, you could use that too.


I will look at your kind suggestions, yes I am good with autoexec and Dlookup's and IF statements.

Thankfully I am home tomorrow so I get a chance to look things I think are interesting..... Have you seen what
Smeghead has sent in return, really looks great as well. But I will look to challenge myself and see if I can do this both ways.
 

vbaInet

AWF VIP
Local time
Today, 04:07
Joined
Jan 22, 2010
Messages
26,374
I will look at your kind suggestions, yes I am good with autoexec and Dlookup's and IF statements.
The one good thing about a splash screen is that it "entertains" the user whilst the job is getting done. The time needed to perform the operations won't matter much if it's a small db though so maybe a splash might be an overkill, but still nice to look at.:D

Thankfully I am home tomorrow so I get a chance to look things I think are interesting
Lucky for some :rolleyes::cool:


Have you seen what Smeghead has sent in return, really looks great as well. But I will look to challenge myself and see if I can do this both ways.
Not had a look but he's always got some good resources, although I've not heard anyone call him Smeghead. SOS, care to comment? ;)
 

SOS

Registered Lunatic
Local time
Yesterday, 20:07
Joined
Aug 27, 2008
Messages
3,517
Not had a look but he's always got some good resources, although I've not heard anyone call him Smeghead. SOS, care to comment? ;)

Well, smeghead is the term for what Rimmer is, where my name is SOS. But I've had others do the same. I don't mind as I probably should be called that at times anyway. :D
 

vbaInet

AWF VIP
Local time
Today, 04:07
Joined
Jan 22, 2010
Messages
26,374
Well, smeghead is the term for what Rimmer is, where my name is SOS. But I've had others do the same. I don't mind as I probably should be called that at times anyway. :D
Just had to wikipedia Rimmer :D
 

SOS

Registered Lunatic
Local time
Yesterday, 20:07
Joined
Aug 27, 2008
Messages
3,517
Red Dwarf, man! Great show! If you haven't seen it, you should. It is fantastic. My favorite episode is the first episode of Season 7. I was dying laughing on that one.
 

vbaInet

AWF VIP
Local time
Today, 04:07
Joined
Jan 22, 2010
Messages
26,374
I will do so, see if it brings back some memories. I bet I've seen it but can't remember.
 

Trevor G

Registered User.
Local time
Today, 04:07
Joined
Oct 1, 2009
Messages
2,341
Well, smeghead is the term for what Rimmer is, where my name is SOS. But I've had others do the same. I don't mind as I probably should be called that at times anyway. :D

Oops sorry if I offended you, I think Red Dwarf is great to, it is amazing that the initial episode was made around cardboard boxes and yet became an amazing success due to acting and script writers.. I enjoy watching when they are re-run on sky gold.....

I looked at the signature block and thought I would be a little different rather than thanking SOS, I thought I would be paying a little closer attention.

Either way I am grateful.
 

Khalid_Afridi

Registered User.
Local time
Today, 06:07
Joined
Jan 25, 2009
Messages
491
Well, smeghead is the term for what Rimmer is, where my name is SOS. But I've had others do the same. I don't mind as I probably should be called that at times anyway. :D

What is the meaning of Rimmer? this is something new word for me :p
 

SOS

Registered Lunatic
Local time
Yesterday, 20:07
Joined
Aug 27, 2008
Messages
3,517
No offense was taken. :)

A good response would also have been Smee Hee. :D
 

Users who are viewing this thread

Top Bottom