|
JDSpilio -> RE: Writing to two tables (6/18/2002 14:44:04)
|
Thanks for the response rdouglass. What I'm creating is a Media catalog from which users can search for and request media (books, CD's, etc). I have 3 tables: tblUsers which contains a userID (text - ID is a SSN) and other user info. tblMedia which contains a mediaID (autonum) and other media info including a mediaSearch field (yes/no) tblRequest which contains a requestID (autonum), mediaID (num), userID (text) and a requestStatus to track the current place in the borrowing cycle (pending, borrowed, overdue, returned). What should happen is when a user enters search parameters, the results will return records from tblMedia where the mediaSearch field is set to yes. The user can then click on a request button which will pass the mediaID to the next page (finalizeRequest.asp). finalizeRequest.asp will take the mediaID and input it into a hidden field to be written into tblRequest, and will have a text box asking the user for their userID. This information will also be written to tblRequest. I also want to change the value of the mediaSearch field in the tblMedia to "no" to remove it from the searches. Following that I want to pass the userID to the next page (user-info.asp) which is also something I haven't yet figured out how to do. When in user-info.asp, users will enter their user information if they already haven't done so. If they have once before, they can skip the page and go to the end (end.asp). Information from here will be written to tblUsers. The userID text box will be automatically populated with the userID value from the previous page. The problem with queries is that if I join tblMedia and tblRequest, I wind up getting multiple recordsets for one media - one recordset per request per media. The same is true of queries linking tblRequest with tblUsers, so query joins are out. The mediaSearch field in tblMedia will be reset using an Access UI by the person in charge of maintaining the media catalog. Any ideas? Thanks in advance! Jonathan
|
|
|
|