Forums

This topic is locked

Passing Info through Pages

Posted 17 Sep 2003 15:26:40
1
has voted
17 Sep 2003 15:26:40 Matt Jukes posted:
Hiya,

I am having a little problem with a Recordset that I am working on. I have in the first instance a Master/Detail Page set which uses its own rs to return results from a search within three tables, which are all inner joined. on the detail page I wish to have a link which takes you to a third page which displays all the records input by one user instead of all searched records. I am having difficulty making the correct user ID the default depending on which advert you have clicked on. The rs looks like this;

SELECT *
FROM ecoche.tblecadvert INNER JOIN ecoche.tblecuser INNER JOIN ecoche.tblecarea ON ecoche.tblecadvert.userId = ecoche.tblecuser.userId AND ecoche.tblecadvert.areaId = ecoche.tblecarea.areaId
WHERE tblecuser.userId = MMColParam

Name: mmColParam
Default: 1
Run-Time: Request.form("userId"

I have on the previous pages put a field which pass on each userId from the db and this shows to be correct. however when ever I try to move on to the next page it always shows entries linked to the userId 1(default value)

There are also two userId's in the tables tblecadvert & tblecuser however the values are the same due to the links in the tables.

I know its a long query and I probably explained myself twice, but I can't see the wood for the trees, any help or ideas would be great. Thanks alot<img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>

Matt

Replies

Replied 18 Sep 2003 07:31:10
18 Sep 2003 07:31:10 Dave Clarke replied:
Try this

<b>Name: mmColParam
Default: 1
Run-Time: Request("userId"</b>

instead of

Name: mmColParam
Default: 1
Run-Time: Request.form("userId"


Dave

ASP|VBScript|IIS5.1|Access|WinXPPro & WinXPHome
Replied 20 Sep 2003 00:49:37
20 Sep 2003 00:49:37 Moazam Baig replied:
Hi

There might be two problems that you are not able to send the correct ID.

I am assuming that your SQL is correct I haven't checked it.

1) Since you want to send the ID when some one clicks on the text. So you want to send the ID through the URL. For this use this:

Run=Time: Request.QueryString(userID)

2) Next check that the checkbox which says send current URL in the Detail behaviour is not signed.

If it is, then what it does it that it also sends the ID you retrieved previously from your Master/Detail page set.
Hope this helps.

Moazam.

Reply to this topic