Using a hidden field in a custom query.

C

chrispl

Hi,

I'm using Frontpage 2003.

I've gone through Microsoft Doc Q321439 and my web page now asks me t
login. It appears to display the username as <%=session("uid")%>

I've created a hidden field which has an initial value o
<%=session("uid")%>, and if I map this hidden field back to th
database, it displays the correct value. In this case "Chris"

On my page I have a field which displays database results. It has
drop down and if i do a simple select, it displays records, I ca
select one, and it writes the data back to a results table.

I want to add a criteria to this field that says something like WHER
[Manager Code] = ::HiddenFieldName:: but as soon as I apply thi
criteria, I get no records back. What am I doing wrong?

Thanks, Chris
 
S

Stefan B Rusynko

1) If your code snippet is based on your DB you are using an illegal field name in Access
- you can not have spaces in field names
- in your DB rename Manager Code to remove the space

2) If the hidden field is in your form you need to refer to it with a Request.form parsed out of the code
"WHERE[ManagerCode] = ::" & Request.Form("HiddenFieldName") & "::"




|
| Hi,
|
| I'm using Frontpage 2003.
|
| I've gone through Microsoft Doc Q321439 and my web page now asks me to
| login. It appears to display the username as <%=session("uid")%>
|
| I've created a hidden field which has an initial value of
| <%=session("uid")%>, and if I map this hidden field back to the
| database, it displays the correct value. In this case "Chris"
|
| On my page I have a field which displays database results. It has a
| drop down and if i do a simple select, it displays records, I can
| select one, and it writes the data back to a results table.
|
| I want to add a criteria to this field that says something like WHERE
| [Manager Code] = ::HiddenFieldName:: but as soon as I apply this
| criteria, I get no records back. What am I doing wrong?
|
| Thanks, Chris.
|
|
| --
| chrisplPosted from http://www.pcreview.co.uk/ newsgroup access
|
 
Top