tnorris
|
| Posted: 02/25/2002, 7:22 AM |
|
I have two forms to collect information from users. I would like to pass the Primary Key (ID) field from the first form to the second. Users are not required to login so I'm not sure how to create a session from the ID field on the first form. Basically it would create the record in Access table from first form then pass ID field to second form to Add the rest of the fields. I'm using ASP. Thanks for any help.
|
|
|
 |
Ken Hardwick
|
| Posted: 02/25/2002, 8:20 AM |
|
If the Primary Key(ID) is entered by the user in the first form,
then in the After Insert event, set it's value to a session
variable.
Session("ID") = fldID
or, if the primary key(id) is an autonumber field, then do a lookup for it..
In after insert,
session("ID") = dlookup("Usertable","max(ID)"," 1 =1 ")
(Note that the dlookup function always requires a where statement so
I just used 1=1 to satisfy that requirement.)
Then, in the second form, add the session("id") as an input parameter.
|
|
|
 |
tnorris
|
| Posted: 02/25/2002, 2:01 PM |
|
Thanks Ken, You really add value to this forum!!!
|
|
|
 |
Mark
|
| Posted: 11/17/2002, 2:29 AM |
|
I am using php would
session("ID") = dlookup("Usertable","max(ID)"," 1 =1 ")
work in php ?
Thx
|
|
|
 |
|