By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,454 Members | 2,633 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,454 IT Pros & Developers. It's quick & easy.

I can't get started, can you help?

P: 5
Hello. I don't know how to do this and I hope you can help.
Using Access 2003 security, I want to capture the currentuser and compare that to rows in a table. When I get a match, I want to get the salesrepID (could also be more than one up to 5 ) and UserGroup from the table. Now I have a proc to populate a temp (SQL) table with all customer transaction sine inception (100k or so), Using the salesrepId(s) I want to delete all customer transactions that are not equal to the salesrepID(s) so that the user only sees transaction for their customers. Then I want to open a custom switchboard for this usergroup.
I have the SQL code, I know how to capture currentuser() but I don't know what to do from there.
Please help!
Emil
Nov 19 '08 #1
Share this Question
Share on Google+
3 Replies


ADezii
Expert 5K+
P: 8,597
Let's start from the beginning first. To which Field in what Table are you comparing the Current User to? Kindly provide, Table Name(s), Field Name(s), Data Types, etc.
Nov 20 '08 #2

overcomer
P: 25
please specify also where you will get the current user... from a field? from the workstation?
Nov 20 '08 #3

P: 5
I have a table called "p21Users" setup as p21user_ID text,Salesrep_ID test, Salesrep_nametext ,location text,Usergroup text.
I'm using a query against the "p21users" which compares the currentuser to the p21user_id. That produces a record which has Salesrep_id, Salesrep_name, location and UserGroup.
Now I have the code
sub test()
If salesrep_id = "1234" Then (this looks like a bad setup cause I would need an If statement for each salesrep_id!)
run a query which deletes all records in temp_Custtran with salesrep_id codes other than 1234, 2045,2046 (this varies with salesrep_id)
open a swithcboard that has menu options specifically for usergroup "Customer"
(there are other usergroups which can print other reports)
Else
end
End If
end sub
but I don't know what the code should be!
Nov 20 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.