Capturing DAP Query Values

G

Guest

Hello all,
I'm a newbie to DAPs so I apologize in advance for my ignorance.
My problem is very basic yet it is driving me bonkers. I have a simple
login script that takes two user inputs (username, password) from the first
page, passes them via a cookie to a page based on a query (qryUsers) which
returns the specified user's name, password , and access level...assuming
that they actually have been granted access. I've used a serverfilter with
the username and would like to compare the password which was inserted on the
first page with the returned value of the query. The serverfilter works
great but I can't seem to get a hold of the return value (displayed in
txtPassword).
Based on my previous programming experience, I should be able to capture
this value by using 'txtPassword.value' but every event I've tried returns
nothing.
Any ideas would be greatly appreciated.
thanks,
jason
 
K

Ken Snell [MVP]

You say you're passing the entered password and user name via cookies to the
second DAP -- so why can't you get the password value from the cookie?

Perhaps I'm not understanding what you're doing.
 
G

Guest

Ken,
I'd like to compare the user input (stored in the cookie) with the returned
value (stored in the db). If they match, then the user can proceed.
If there is a better way of doing this, I'm open to suggestions.
thanks,
jason
 
K

Ken Snell [MVP]

The password returned from the database will be a field in the second DAP's
recordset, right? And you have an element (textbox) on that DAP that is
bound to that field?

Is that second DAP a single-record display?

You should be able to use something like this:

If
MSODSC.DataPage(0).CurrentSection.Recordset.Fields("passwordfieldname").Value
= VariableWithValueFromCookie Then



--

Ken Snell
<MS ACCESS MVP>
 
G

Guest

First of all, thanks for the response. In response to your questions:
The password returned from the database will be a field in the second DAP's
recordset, right? Yes

And you have an element (textbox) on that DAP that is
bound to that field?
Yes; txtPassword
Is that second DAP a single-record display?
Yes

fyi: "MSODSC.DataPage(0)" doesn't have a "CurrentSection" property

I tried your method (replacing "...CurrentSection.Recordset..." with
".RecordSet.Fields...") but to no avail, though it does seem like it should
work. Is there a particular event you might recommend that I use?

thanks again,
jason
 
K

Ken Snell [MVP]

My apology... I mistyped the expression:

MSODSC.CurrentSection.DataPage.Recordset.Fields("passwordfieldname").Value
= VariableWithValueFromCookie Then

Use the MSODSC.DataPageComplete event.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top