473,385 Members | 1,867 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

I can't get started, can you help?

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
3 1208
ADezii
8,834 Expert 8TB
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
please specify also where you will get the current user... from a field? from the workstation?
Nov 20 '08 #3
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

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

Similar topics

0
by: xixi | last post by:
hi, we are using db2 udb v8.1 on win 64 bit with fp3 with type 4 db2jcc.jar driver. when i execute this query , select id, arno01, arcd01, arno16, artx01, armo09, ardy09, arcc09, aryr09,...
2
by: Phil Stanton | last post by:
I have got the following snippet of code to add a record from a form With BoatSet .AddNew !RaceMasterID = RaceSet!RaceMasterID !BoatID = BoatID !ClubID = ClubID !RacingNo = SeriesRacingNo...
7
by: Alan Silver | last post by:
Hello, I would like to create a new web site with VWD, but would like to run it under IIS, not the development server. One reason for this is that I want the web site to be at the domain root,...
4
by: goldbond_8 | last post by:
I am looking to learn VB.net. I have been programming in VB6 for about 3 years but have not done much Object Oriented Programming. I know VB.Net is much different from VB6, so my question is,...
3
by: ken | last post by:
Hello, I can't figure out how to solve this problem. I modified the timer example given in the help section. It increments a count every 3 millisecond in order to simulate a tank being filled with...
0
by: kmounkhaty | last post by:
Hi Guru, I'm tired of trouleshoot one of my sql box that the sqlagent can't started. Here is the message: SQLServerAgent could not be started (reason: Unable to connect to server '(local)';...
6
by: =?Utf-8?B?RGF2ZQ==?= | last post by:
I'm running VS 2003/ASP.NET 1.1.4322.0 on XP SP2 All of a sudden I started to getting... "Error while trying to run project: Unable to start debugging on the web server. Server side-error...
65
by: Chris Carlen | last post by:
Hi: From what I've read of OOP, I don't get it. I have also found some articles profoundly critical of OOP. I tend to relate to these articles. However, those articles were no more objective...
5
by: nttuanit | last post by:
I have a Web App, I want to start Main page automatically after IIS is started without any request from browser. OR run one Script in Global.asax after IIS started. I understand that the...
18
by: Paul Lautman | last post by:
JRough wrote: What do you mean by "redirect the output to Excel"??? Excel isn't a location, it's a spreadsheet program that some (but not all users) will have on their machine. BTW, Location:...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.