TAK Christian_Belgien & hugopedersen
Jeg forklaret mig måske ikke så godt, men tak alligevel.
Jeg fandt selv en løsning...
TIL ALLE ANDRE INTERESSERET...
Jeg poster min kode så i også kan bruge det:
URL.:
http://localhost/Dagsrapport.asp?ID=1122010Man kalder resultatet gennem URL'en
ID=1122010 er idags dato uden punktumer osv.
Row: (dagsdato) indeholder =1122010
<%
'Dimension variables
Dim Conn9 'Holds the Database Connection Object
Dim rs9 'Holds the recordset for the records in the database
Dim sql9 'Holds the SQL query for the database
'Holds the record number to be updated
'Create an ADO connection odject
Set Conn9 = Server.CreateObject("ADODB.Connection")
'Set an active connection to the Connection object using a DSN-less connection
Conn9.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("database/e-shop.mdb")
sql9 = "SELECT OrderForm_Company1,SUM(Total_AllIncluded1) AS Sum_Total_AllIncluded1 FROM kvitteringer GROUP BY OrderForm_Company1,dagsdato=" & lngRecordNo
Set rs9 = Conn9.Execute(sql9)
%><%
'Write the HTML to display the current record in the recordset
'Loop through the recordset
Do While not rs9.EOF
Response.Write ("<TABLE BORDER=1 width=500 cellspacing=0 cellpadding=1 bordercolor=#ffffff bgcolor=#eeeeee>")
Response.Write ("<td width=250><b><font face=verdana size=1>")
Response.Write ("Betalingstype")
Response.Write ("</b></td></font>")
Response.Write ("<td width=250><font face=verdana size=1><div align=right>")
Response.Write ("Total")
Response.Write ("</b></td></font>")
Response.Write ("</tr>")
Response.Write ("<tr>")
Response.Write ("<td><font face=verdana size=1>")
Response.Write (rs9("OrderForm_Company1"))
Response.Write ("</td></font></div>")
Response.Write ("<td height=30><font face=verdana size=1><div align=right>")
Response.Write (rs9("Sum_Total_AllIncluded1"))
Response.Write (",-DKK")
Response.Write ("<br>")
Response.Write ("</td></font></div>")
Response.Write ("</tr>")
Response.Write ("</TABLE>")
Response.Write ("<br>")
'Move to the next record in the recordset
rs9.MoveNext
Loop
'Reset server objects
rs9.Close
Set rs9 = Nothing
Set Conn9 = Nothing
%><br>