query links?

Results 1 to 3 of 3

Thread: query links?

  1. #1
    Jon O'Loughlin Guest

    Default query links?

    I am working on a project using an access database and ASP. I am having trouble deciding on one aspect: When I use a query to output a table containing name,location,email,occasions: I then need the occasions field to have a list of values (there is more than one occasion per name):HOW DO I DO IT?<BR><BR>Aswell as this, the occasions field needs to be active, that is a user can click on it and it will than call up another table with all the names associated with that occasion (there can be more than one name per occasion):PLEASE HELP! I don&#039t know wether i should make these fields the hyperlink datatype in access, or put in some VBscript and/or SQL statements to achieve this. I hope this made sense.<BR><BR>

  2. #2
    ??? Guest

    Default Make very little sense

    I think you need to have a good think about what you are trying to do. <BR><BR>To make the link as you seem to want them you just need an ordinary html anchor:<BR><BR>&#060;a href="names.asp?Occasion=&#060;%=Rs("Occasion")%&# 062;"&#062;&#060;%=Rs("Occasion")%&#062;&#060;/a&#062;<BR><BR>Note that in the above example, Rs refers to a recordset that you would already have opened. <BR><BR>Then in the script, names.asp, you would formulate a query asking for on your table to filter for the occasion indicated by the link:<BR><BR>&#060;%<BR>SQLQueryStr="Select * from OccasionsTable where Occasion=&#039" & Request.QueryString("Occasion") & "&#039"<BR>Set Rs=Server.CreateObject("ADODB.RecordSet")<BR>Rs.Op en SQLQueryStr, Conn<BR>Do while not RS.Eof<BR>%&#062;&#060;%=Rs("Name")%&#062;<BR>&#06 0;%<BR>RS.MoveNext<BR>Loop<BR>%&#062;

  3. #3
    Join Date
    Dec 1969

    Default RE: query links?

    You should create a seperate occasion table and link it back to the main table using a one to man relationship then link the table with the names associated to the ocassions back to the occasion table using a one to many relationship

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts