I am returning a recordset with the following query:
The query returns the correct information. However, I am having a difficult time displaying the information. Currently, I am using the following ASP/HTML:
The display is a table diplays the following:
SUPPLIER A | DIVISION 1 | BUTTONS
-------------------------------------------
SUPPLIER A | DIVISION 2 | BUTTONS
-------------------------------------------
SUPPLIER A | DIVISION 3 | BUTTONS
-------------------------------------------
SUPPLIER B | DIVISION 1 | BUTTONS
-------------------------------------------
SUPPLIER B | DIVISION 2 | BUTTONS
I would like the table to display as follows:
| DIVISION 1 |
SUPPLIER A | DIVISION 2 | BUTTONS
| DIVISION 3 |
-------------------------------------------
SUPPLIER B | DIVISION 1 | BUTTONS
| DIVISION 2 |
Please advise. Kind regards, Krickles
Code:
SELECT sdl.supplier_division_id,
s.supplier_id,
s.supplier_name,
sdl.status_id,
sl.status_desc
FROM supplier AS s
INNER JOIN supplier_division_lu AS sdl ON sdl.supplier_id = s.supplier_id
INNER JOIN division_lu AS d ON d.division_id = sdl.division_id
INNER JOIN status_lu AS sl ON sl.status_id = sdl.status_id
ORDER BY s.supplier_name
The query returns the correct information. However, I am having a difficult time displaying the information. Currently, I am using the following ASP/HTML:
Code:
Set rsGetList = objRec
rsGetList.MoveFirst
...some html code with <table> and <th>
Do While NOT rsGetList.EOF
Response.Write ("<TD>")
Response.Write rsGetList("supplier_name")
IF varSupplier_ID = rsGetList("supplier_id") THEN
Response.Write ("<TD>")
Response.Write ("<INPUT type = checkvox id=checkbox1 name=")
Response.Write ("'" & rsGetList("division_name") & "'")
Response.Write (rsGetList("status_desc"))
Response.Write (">")
Response.Write rsGetList("division_name")
Response.Write ("<BR>")
Response.Write ("</TD>")
END IF
Response.Write ("<TD>")
...html buttons
Response.Write ("</TR">)
rsGetList.MoveNext
Loop
The display is a table diplays the following:
SUPPLIER A | DIVISION 1 | BUTTONS
-------------------------------------------
SUPPLIER A | DIVISION 2 | BUTTONS
-------------------------------------------
SUPPLIER A | DIVISION 3 | BUTTONS
-------------------------------------------
SUPPLIER B | DIVISION 1 | BUTTONS
-------------------------------------------
SUPPLIER B | DIVISION 2 | BUTTONS
I would like the table to display as follows:
| DIVISION 1 |
SUPPLIER A | DIVISION 2 | BUTTONS
| DIVISION 3 |
-------------------------------------------
SUPPLIER B | DIVISION 1 | BUTTONS
| DIVISION 2 |
Please advise. Kind regards, Krickles