Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

query issues with user id and multiple records

Status
Not open for further replies.

evr72

MIS
Dec 8, 2009
265
US
hello,

I am having a hard time, I have my records table, this has a userid this is the only way I can link it to my users table
the problem that I have is that about 3 users have multiple user id's. For example
Sam has id 50 and 60
tim has id 90, 100, 180

what I am trying to accomplish is to have a single login for each user that would show the records of that user. In stead of having multiple logins for one user.

Not sure if there is a way to accomplish this?
 
what you can do in user records table is to have all user id's to have the same login id:
login user_id
sam_doe 50
sam_doe 60
tim_buck 90
tim_buck 100
tim_buck 180
this way all id's for the same person will have the same login.
 
Thanks wvdba, I tried that before and it did not seem to work. But I found a solution

here is what I did
Code:
set dal_TableName = dal.Table("mytable.webusr")
set rstmp = dal_TableName.Query("usr='" & Session("UserID") & "'","")
if rstmp("usr")<>"" then
custom_where = "USERID "& rstmp("chr")
strWhereClause = whereAdd(strWhereClause,custom_where)
end if
rstmp.close
set rstmp=nothing

I created a field called "chr" in my users db
This field has either "=100" or
"in(30,40,50)". Where the numbers are the userid.

Works well.

Thank you !!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top