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

Access variable in other form

Status
Not open for further replies.

potinenip

Programmer
Jul 12, 2000
35
0
0
US
Visit site
Hi,<br><br>UserID is assigned by SQL server when each new user enters his data. I want to get the UserID assigned by server into another form .<br>I want to get the UserID into another form where i am inserting the details of AboutProperty.cfm in A table HomesOrLands. In Table HomesOrLands i have UserID as a field which can't be null.<br>So i have to get UserID from Sellers table and insert in HomesOrLands.<br>Can someone help me on this.<br>If i am not clear i can clarify my question again.&nbsp;&nbsp;<br><br>Praveen
 
You need to select the record you have just inserted to get the value.<br>If you do this all inside a CFTRANSACTION then you will get the correct value.<br><br>&lt;cftransaction&gt;<br>&lt;cfquery&gt;<br>your insert query<br>&lt;/cfquery&gt;<br>&lt;cfquery name=&quot;blah&quot;&gt;<br>SELECT max(userID) as lastID<br>FROM table<br>&lt;/cfquery&gt;<br>&lt;/cftransaction&gt;<br><br>now you can pass this value to another page.<br> <p>Russ Michaels<br><a href=mailto:russ@satachi.com>russ@satachi.com</a><br><a href= Internet Development</a><br>For my personal book recommendations visit <br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top