custom login form - i need the user's name as a string

G

garyusenet

to set the scence: -

six salesman and one admin team, the admin team consists of 3 people.
so in total with have 9 users of the database.
----

The database has a custom menu bar. Only one menu heading at the
moments, and that is called 'leads' off of this there is only one
option at the moment. 'add new lead'.

The idea is that each member of the admin team will have the database
open. when a new lead comes through they will choose that menu option i
just explained. This loads a form which allows them to enter the
callers name, telephone number, and via a dropdown box indicate the
salesman they are passing the lead through to.

the salesman then when he gets the call through clicks on a yet to be
invented menu option 'take lead'.

I want this to display the last lead entered lead for the salesman
CURRENTLY LOGGED IN.

i have no idea how i should achieve this.

Should i make a custom login form at the start of the database, which
stores the salesman's name in a string and then use this string in a
query? If i do this i would have the problem that all records for that
particular salesman will be displayed by the query, however using the
following code (gleamed from an earlier post) i think I can get around
this (can someone clarify if i'm on the right lines here please.) -

SELECT * FROM yourtable
WHERE [Field 2] = (SELECT Max([Field 2]) FROM yourtable AS X
WHERE X.[Salesman] LIKE [Enter salesman's name:] & "*")

my question is should i make my own login form, and if so how should i
do this? thanks

Gary.
 
K

Keith

I want this to display the last lead entered lead for the salesman
CURRENTLY LOGGED IN.

Into where, the database or the network? The "ENVIRON" property will return
the network ID and the CurrentUser function will return the ID of the
database user (but will always be "Admin" if you haven't set up security).
i have no idea how i should achieve this.

Should i make a custom login form at the start of the database, which
stores the salesman's name in a string and then use this string in a
query?

Well you could but the string would empty if a run-time error occurred.

HTH - Keith.
www.keithwilby.com
 

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