A Couple of Questions

JC3

Registered User.
Local time
Today, 04:29
Joined
Jun 13, 2005
Messages
53
Hi all

I am new to Access and have just designed a new database and was wondering if anyone could help with a few questions.

1/ I am setting up a Macro to send an e-mail on the change of a form. When the e-mail is generated by Access I get a message from Outlook stating that "A program is trying to automatically send e-mail..." and asks you to confirm that it is ok to go. Is there any way to bypass this check or alternatively send the e-mail from a specific e-mail address rather than the database user.

2/ I have changed the background colours on a number of my forms but the Record Selector's and Scroll Bar stay the standard Access Grey. Is there anyway to change these?

3/ I have used the User Security Wizard to setup users, groups and access but I can't seem to see a way to limit the number of simulateous logins a person can have i.e. I can log in more than once with the same user when I only want to be able to login once. Any ideas?

Any help would be greatly appreciated.

JC
 
JC3 said:
Hi all

1/ I am setting up a Macro to send an e-mail on the change of a form. When the e-mail is generated by Access I get a message from Outlook stating that "A program is trying to automatically send e-mail..." and asks you to confirm that it is ok to go. Is there any way to bypass this check or alternatively send the e-mail from a specific e-mail address rather than the database user.

Take a look at this thread :
http://www.access-programmers.co.uk/forums/showthread.php?t=86970&highlight=program+automatically
Especially post 5 is some good VBA to automate e-mail.
 
2/ I have changed the background colours on a number of my forms but the Record Selector's and Scroll Bar stay the standard Access Grey. Is there anyway to change these?

These elements obtain their colors from the system scheme because they are part of the default controls on a true child window. Access doesn't create the windows (little w)... Windows (big W) does. Therefore, whatever is set up for the default window style is what you are going to get.


I can log in more than once with the same user when I only want to be able to login once. Any ideas?


Unfortunately, there are numerous pitfalls with this concept because of a little problem that sometimes crops up. If you log in and Access marks you as 'present' but then your network connection goes away, Access never gets the chance to mark you as 'absent' - because remember, it is YOUR WORKSTATION that does the marking.

Unless you are willing to delve rather deeply into the Windows locking scheme on the server hosting your DB, I don't know of an easy way to find this out. And I'm NOT talking about looking into the .MDW or .LDB file to see who is "in" at the moment. The ONLY way to be sure is to test the FILE locking system of the .MDB file's host. And you are not guaranteed to do that in all cases. Among other things there is the issue of whether RPC is allowed in your domain.

The real problem here is that Access is a distributed system. The work is done by participating workstations. In order to correctly mark that a member has left for a shared .MDB, you need events to happen (Access events) that can trigger the unmarking when you are done. And therein lies the rub. If your workstation takes the long dive into the shallow pool, you don't have time to unmark the .MDB file. I.e. you cannot predict workstation failures and cannot unmark your access without a workstation active.

So what would happen is that you mark the DB as open by user FREDFLINTSTONE - but Fred is running a real dinosaur of a terminal and it crashes. Now Fred is marked as "in" and can't get in again until someone else marks him "out." That someone will be you, in all likelihood. Do you want to have permanent duty as the keymaster, unlocking users every time the network hiccups? I would advise a different approach. If you want to track who comes in and who gets out, ...

Implement a startup form. In the form's Form_Load event, update an attendance table with an IN entry. In the form's Form_Exit or Form_Unload event, update the attendance table with an OUT entry. Next time a user logs in, run a query to count In and Out entries (from the Startup Form). Perhaps you can filter the list based on keeping no entries older than some number of days. Then , just tell your user (through the startup form) that you show s/he is still logged in from another terminal and thereofore appears to be logged in more than one time.

Then you publish instructions saying, "If you get this message and you believe it to be in error, notify me. If you get this message and you know it to be right, be aware that we keep records and double logins are against the rules." Now, to make that stick, you need your supervisor or manager to confirm the rule.
 
Thanks

Thanks for the help people. I will give these a bash.

Thanks much.

JC3

:D
 
Supplement to my "startup form" suggestion. To make this work right, the startup form cannot exit once you are ready to let the user go about his/her business. The form must minimize itself and make itself invisible. Then when the user is about to exit Access, the dormant but still technically open form gets closed and that will be the trigger event to update the OUT entry.

My bad for leaving out that detail earlier.
 

Users who are viewing this thread

Back
Top Bottom