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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

web script syntax

Status
Not open for further replies.

evr72

MIS
Dec 8, 2009
265
0
0
US
Hello,

I have a web application, I am trying to modify a line so it shows data for the user and the specific area.

user one belongs to the Accounting Payables area
user two belongs to the Accounting Receivables area
user three belongs to the Accounting General Area
and so on
So. if user one logs in he/she should be able to see only data from Accounting Payables area. The fields that I am working with are username, cycle, functionalarea
cycle would be Accounting or any other Department and the functionalarea would be the Payables, etc.

Here is what I am trying to change
Code:
set rsuidexist = dal_users.Query("username='" & Request.Form("username")  & "'","")
I would like to add

Code:
set rsuidexist = dal_users.Query("username='" & Request.Form("username")  & "' and "cycle='" rstmp2(cycle)'" and "functionalarea=rstmp2(functionalarea)"'","")

but not sure about the syntax

thanks!!!
 
functionalarea is character field, so it looks like you are missing a ' and you concatenate the string "rstmp2(functionalarea)" instead of its value. If you are referring to fieldNAMES in a recordset, you must use quoter:

Code:
"functionalarea=rstmp2(functionalarea)"'"


Code:
"functionalarea='" & rstmp2("functionalarea") & "'"

?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top