making a db field link on a page
I need help in making a db field link to another page. Actually it is more than making a link. Let me explain;
I have a table listed on a page from a database and there is a filed called reports in that table whose values are either true or false. In the same table main reference field is customerid.What I need to do is making this field linked to another page (if it is true) whose is in different table and use CAD# as amain reference field. (there is no customerid in this table.)I need to get the customerid in the first table and CAD # that is on the same row and use the CAD# in the second table to list information belong that CAD#. I am not sure If I am clear! I am trying to use the code below but I am not sure If it is the one I need.
Set Rec = Conn.Execute("Select * From USER Where customerid=555" )
Set Rec = Conn.Execute("Select * From USER Where CAD#=" & customerid)
Thank you all