det er et recordset fra en forespøgsel i Access
HELE KODEN - hrmm, så er du selv ude om det - det meste er lavet i Dreamweaver.
Jeg har siddet det meste af natten og arbejdet, så der er lavet meget om. Faktisk er jeg begyndt på den hårde måde, men at indsætte html/asp-kode inde i alle mine 12 case.
Men har du en løsning til hvordan det kan undgås. Altså hvordan man smider syntaksen fra et recordset over i en variabel i en case der så styrer hvilket af de 12 recordset der bliver aktivt.
Meningen med det hele er at man skal kunne vælge data for en bestemt måned og kunne se dem i en tabel.
her kommer koden. Jeg har for søgt at markere hvor det er mest aktuelt.
<%@LANGUAGE=\"VBSCRIPT\"%>
<!--#include file=\"Connections/regnskab.asp\" -->
<%
\' *** Edit Operations: declare variables
MM_editAction = CStr(Request(\"URL\"))
If (Request.QueryString <> \"\") Then
MM_editAction = MM_editAction & \"?\" & Request.QueryString
End If
\' boolean to abort record edit
MM_abortEdit = false
\' query string to execute
MM_editQuery = \"\"
%>
<%
\' *** Insert Record: set variables
If (CStr(Request(\"MM_insert\")) <> \"\") Then
MM_editConnection = MM_regnskab_STRING
MM_editTable = \"Postering\"
MM_editRedirectUrl = \"regnskab2001.asp\"
MM_fieldsStr = \"txtDato|value|txtBeloeb|value|slcArt|value|txtBeskrivelse|value\"
MM_columnsStr = \"Dato|\',none,\'\'|Beloeb|\',none,\'\'|Art|\',none,\'\'|Beskrivelse|\',none,\'\'\"
\' create the MM_fields and MM_columns arrays
MM_fields = Split(MM_fieldsStr, \"|\")
MM_columns = Split(MM_columnsStr, \"|\")
\' set the form values
For i = LBound(MM_fields) To UBound(MM_fields) Step 2
MM_fields(i+1) = CStr(Request.Form(MM_fields(i)))
Next
\' append the query string to the redirect URL
If (MM_editRedirectUrl <> \"\" And Request.QueryString <> \"\") Then
If (InStr(1, MM_editRedirectUrl, \"?\", vbTextCompare) = 0 And Request.QueryString <> \"\") Then
MM_editRedirectUrl = MM_editRedirectUrl & \"?\" & Request.QueryString
Else
MM_editRedirectUrl = MM_editRedirectUrl & \"&\" & Request.QueryString
End If
End If
End If
%>
<%
\' *** Insert Record: construct a sql insert statement and execute it
If (CStr(Request(\"MM_insert\")) <> \"\") Then
\' create the sql insert statement
MM_tableValues = \"\"
MM_dbValues = \"\"
For i = LBound(MM_fields) To UBound(MM_fields) Step 2
FormVal = MM_fields(i+1)
MM_typeArray = Split(MM_columns(i+1),\",\")
Delim = MM_typeArray(0)
If (Delim = \"none\") Then Delim = \"\"
AltVal = MM_typeArray(1)
If (AltVal = \"none\") Then AltVal = \"\"
EmptyVal = MM_typeArray(2)
If (EmptyVal = \"none\") Then EmptyVal = \"\"
If (FormVal = \"\") Then
FormVal = EmptyVal
Else
If (AltVal <> \"\") Then
FormVal = AltVal
ElseIf (Delim = \"\'\") Then \' escape quotes
FormVal = \"\'\" & Replace(FormVal,\"\'\",\"\'\'\") & \"\'\"
Else
FormVal = Delim + FormVal + Delim
End If
End If
If (i <> LBound(MM_fields)) Then
MM_tableValues = MM_tableValues & \",\"
MM_dbValues = MM_dbValues & \",\"
End if
MM_tableValues = MM_tableValues & MM_columns(i)
MM_dbValues = MM_dbValues & FormVal
Next
MM_editQuery = \"insert into \" & MM_editTable & \" (\" & MM_tableValues & \") values (\" & MM_dbValues & \")\"
If (Not MM_abortEdit) Then
\' execute the insert
Set MM_editCmd = Server.CreateObject(\"ADODB.Command\")
MM_editCmd.ActiveConnection = MM_editConnection
MM_editCmd.CommandText = MM_editQuery
MM_editCmd.Execute
MM_editCmd.ActiveConnection.Close
If (MM_editRedirectUrl <> \"\") Then
Response.Redirect(MM_editRedirectUrl)
End If
End If
End If
%>
<%
set rcsPostering = Server.CreateObject(\"ADODB.Recordset\")
rcsPostering.ActiveConnection = MM_regnskab_STRING
rcsPostering.Source = \"SELECT * FROM Postering ORDER BY Dato ASC\"
rcsPostering.CursorType = 0
rcsPostering.CursorLocation = 2
rcsPostering.LockType = 3
rcsPostering.Open()
rcsPostering_numRows = 0
%>
<%
set rcsArt = Server.CreateObject(\"ADODB.Recordset\")
rcsArt.ActiveConnection = MM_regnskab_STRING
rcsArt.Source = \"SELECT * FROM Art\"
rcsArt.CursorType = 0
rcsArt.CursorLocation = 2
rcsArt.LockType = 3
rcsArt.Open()
rcsArt_numRows = 0
%>
<%
set rcsSum = Server.CreateObject(\"ADODB.Recordset\")
rcsSum.ActiveConnection = MM_regnskab_STRING
rcsSum.Source = \"SELECT * FROM Sum\"
rcsSum.CursorType = 0
rcsSum.CursorLocation = 2
rcsSum.LockType = 3
rcsSum.Open()
rcsSum_numRows = 0
%>
<%
set Saldo_ialt = Server.CreateObject(\"ADODB.Recordset\")
Saldo_ialt.ActiveConnection = MM_regnskab_STRING
Saldo_ialt.Source = \"SELECT * FROM Saldo_ialt\"
Saldo_ialt.CursorType = 0
Saldo_ialt.CursorLocation = 2
Saldo_ialt.LockType = 3
Saldo_ialt.Open()
Saldo_ialt_numRows = 0
%>
<%
set rcsSum_Mdr = Server.CreateObject(\"ADODB.Recordset\")
rcsSum_Mdr.ActiveConnection = MM_regnskab_STRING
rcsSum_Mdr.Source = \"SELECT * FROM Sum_mdr\"
rcsSum_Mdr.CursorType = 0
rcsSum_Mdr.CursorLocation = 2
rcsSum_Mdr.LockType = 3
rcsSum_Mdr.Open()
rcsSum_Mdr_numRows = 0
%>
<%
set rcsSum_Art_1 = Server.CreateObject(\"ADODB.Recordset\")
rcsSum_Art_1.ActiveConnection = MM_regnskab_STRING
rcsSum_Art_1.Source = \"SELECT * FROM Sum_Art_1\"
rcsSum_Art_1.CursorType = 0
rcsSum_Art_1.CursorLocation = 2
rcsSum_Art_1.LockType = 3
rcsSum_Art_1.Open()
rcsSum_Art_1_numRows = 0
%>
<%
set rcsSum_Art_2 = Server.CreateObject(\"ADODB.Recordset\")
rcsSum_Art_2.ActiveConnection = MM_regnskab_STRING
rcsSum_Art_2.Source = \"SELECT * FROM Sum_Art_2\"
rcsSum_Art_2.CursorType = 0
rcsSum_Art_2.CursorLocation = 2
rcsSum_Art_2.LockType = 3
rcsSum_Art_2.Open()
rcsSum_Art_2_numRows = 0
%>
<%
set rcsSum_Art_3 = Server.CreateObject(\"ADODB.Recordset\")
rcsSum_Art_3.ActiveConnection = MM_regnskab_STRING
rcsSum_Art_3.Source = \"SELECT * FROM Sum_Art_3\"
rcsSum_Art_3.CursorType = 0
rcsSum_Art_3.CursorLocation = 2
rcsSum_Art_3.LockType = 3
rcsSum_Art_3.Open()
rcsSum_Art_3_numRows = 0
%>
<%
set rcsSum_Art_4 = Server.CreateObject(\"ADODB.Recordset\")
rcsSum_Art_4.ActiveConnection = MM_regnskab_STRING
rcsSum_Art_4.Source = \"SELECT * FROM Sum_Art_4\"
rcsSum_Art_4.CursorType = 0
rcsSum_Art_4.CursorLocation = 2
rcsSum_Art_4.LockType = 3
rcsSum_Art_4.Open()
rcsSum_Art_4_numRows = 0
%>
<%
set rcsSum_Art_5 = Server.CreateObject(\"ADODB.Recordset\")
rcsSum_Art_5.ActiveConnection = MM_regnskab_STRING
rcsSum_Art_5.Source = \"SELECT * FROM Sum_Art_5\"
rcsSum_Art_5.CursorType = 0
rcsSum_Art_5.CursorLocation = 2
rcsSum_Art_5.LockType = 3
rcsSum_Art_5.Open()
rcsSum_Art_5_numRows = 0
%>
<%
set rcsSum_Art_6 = Server.CreateObject(\"ADODB.Recordset\")
rcsSum_Art_6.ActiveConnection = MM_regnskab_STRING
rcsSum_Art_6.Source = \"SELECT * FROM Sum_Art_6\"
rcsSum_Art_6.CursorType = 0
rcsSum_Art_6.CursorLocation = 2
rcsSum_Art_6.LockType = 3
rcsSum_Art_6.Open()
rcsSum_Art_6_numRows = 0
%>
<%
set rcsSum_Art_7 = Server.CreateObject(\"ADODB.Recordset\")
rcsSum_Art_7.ActiveConnection = MM_regnskab_STRING
rcsSum_Art_7.Source = \"SELECT * FROM Sum_Art_7\"
rcsSum_Art_7.CursorType = 0
rcsSum_Art_7.CursorLocation = 2
rcsSum_Art_7.LockType = 3
rcsSum_Art_7.Open()
rcsSum_Art_7_numRows = 0
%>
<%
set rcsSum_Art_8 = Server.CreateObject(\"ADODB.Recordset\")
rcsSum_Art_8.ActiveConnection = MM_regnskab_STRING
rcsSum_Art_8.Source = \"SELECT * FROM Sum_Art_8\"
rcsSum_Art_8.CursorType = 0
rcsSum_Art_8.CursorLocation = 2
rcsSum_Art_8.LockType = 3
rcsSum_Art_8.Open()
rcsSum_Art_8_numRows = 0
%>
<%
set rcsSum_Art_9 = Server.CreateObject(\"ADODB.Recordset\")
rcsSum_Art_9.ActiveConnection = MM_regnskab_STRING
rcsSum_Art_9.Source = \"SELECT * FROM Sum_Art_9\"
rcsSum_Art_9.CursorType = 0
rcsSum_Art_9.CursorLocation = 2
rcsSum_Art_9.LockType = 3
rcsSum_Art_9.Open()
rcsSum_Art_9_numRows = 0
%>
<%
set rcsSum_Art_10 = Server.CreateObject(\"ADODB.Recordset\")
rcsSum_Art_10.ActiveConnection = MM_regnskab_STRING
rcsSum_Art_10.Source = \"SELECT * FROM Sum_Art_10\"
rcsSum_Art_10.CursorType = 0
rcsSum_Art_10.CursorLocation = 2
rcsSum_Art_10.LockType = 3
rcsSum_Art_10.Open()
rcsSum_Art_10_numRows = 0
%>
<%
set rcsSum_Art_11 = Server.CreateObject(\"ADODB.Recordset\")
rcsSum_Art_11.ActiveConnection = MM_regnskab_STRING
rcsSum_Art_11.Source = \"SELECT * FROM Sum_Art_11\"
rcsSum_Art_11.CursorType = 0
rcsSum_Art_11.CursorLocation = 2
rcsSum_Art_11.LockType = 3
rcsSum_Art_11.Open()
rcsSum_Art_11_numRows = 0
%>
<%
set rcsSum_Art_12 = Server.CreateObject(\"ADODB.Recordset\")
rcsSum_Art_12.ActiveConnection = MM_regnskab_STRING
rcsSum_Art_12.Source = \"SELECT * FROM Sum_Art_12\"
rcsSum_Art_12.CursorType = 0
rcsSum_Art_12.CursorLocation = 2
rcsSum_Art_12.LockType = 3
rcsSum_Art_12.Open()
rcsSum_Art_12_numRows = 0
%>
<%
set rcsSum_Mdr_1 = Server.CreateObject(\"ADODB.Recordset\")
rcsSum_Mdr_1.ActiveConnection = MM_regnskab_STRING
rcsSum_Mdr_1.Source = \"SELECT * FROM Sum_mdr_1\"
rcsSum_Mdr_1.CursorType = 0
rcsSum_Mdr_1.CursorLocation = 2
rcsSum_Mdr_1.LockType = 3
rcsSum_Mdr_1.Open()
rcsSum_Mdr_1_numRows = 0
%>
<%
set rcsSum_Mdr_2 = Server.CreateObject(\"ADODB.Recordset\")
rcsSum_Mdr_2.ActiveConnection = MM_regnskab_STRING
rcsSum_Mdr_2.Source = \"SELECT * FROM Sum_mdr_2\"
rcsSum_Mdr_2.CursorType = 0
rcsSum_Mdr_2.CursorLocation = 2
rcsSum_Mdr_2.LockType = 3
rcsSum_Mdr_2.Open()
rcsSum_Mdr_2_numRows = 0
%>
<%
set rcsSum_Mdr_3 = Server.CreateObject(\"ADODB.Recordset\")
rcsSum_Mdr_3.ActiveConnection = MM_regnskab_STRING
rcsSum_Mdr_3.Source = \"SELECT * FROM Sum_mdr_3\"
rcsSum_Mdr_3.CursorType = 0
rcsSum_Mdr_3.CursorLocation = 2
rcsSum_Mdr_3.LockType = 3
rcsSum_Mdr_3.Open()
rcsSum_Mdr_3_numRows = 0
%>
<%
set rcsSum_Mdr_4 = Server.CreateObject(\"ADODB.Recordset\")
rcsSum_Mdr_4.ActiveConnection = MM_regnskab_STRING
rcsSum_Mdr_4.Source = \"SELECT * FROM Sum_mdr_4\"
rcsSum_Mdr_4.CursorType = 0
rcsSum_Mdr_4.CursorLocation = 2
rcsSum_Mdr_4.LockType = 3
rcsSum_Mdr_4.Open()
rcsSum_Mdr_4_numRows = 0
%>
<%
set rcsSum_Mdr_5 = Server.CreateObject(\"ADODB.Recordset\")
rcsSum_Mdr_5.ActiveConnection = MM_regnskab_STRING
rcsSum_Mdr_5.Source = \"SELECT * FROM Sum_mdr_5\"
rcsSum_Mdr_5.CursorType = 0
rcsSum_Mdr_5.CursorLocation = 2
rcsSum_Mdr_5.LockType = 3
rcsSum_Mdr_5.Open()
rcsSum_Mdr_5_numRows = 0
%>
<%
set rcsSum_Mdr_6 = Server.CreateObject(\"ADODB.Recordset\")
rcsSum_Mdr_6.ActiveConnection = MM_regnskab_STRING
rcsSum_Mdr_6.Source = \"SELECT * FROM Sum_mdr_6\"
rcsSum_Mdr_6.CursorType = 0
rcsSum_Mdr_6.CursorLocation = 2
rcsSum_Mdr_6.LockType = 3
rcsSum_Mdr_6.Open()
rcsSum_Mdr_6_numRows = 0
%>
<%
set rcsSum_Mdr_7 = Server.CreateObject(\"ADODB.Recordset\")
rcsSum_Mdr_7.ActiveConnection = MM_regnskab_STRING
rcsSum_Mdr_7.Source = \"SELECT * FROM Sum_mdr_7\"
rcsSum_Mdr_7.CursorType = 0
rcsSum_Mdr_7.CursorLocation = 2
rcsSum_Mdr_7.LockType = 3
rcsSum_Mdr_7.Open()
rcsSum_Mdr_7_numRows = 0
%>
<%
set rcsSum_Mdr_8 = Server.CreateObject(\"ADODB.Recordset\")
rcsSum_Mdr_8.ActiveConnection = MM_regnskab_STRING
rcsSum_Mdr_8.Source = \"SELECT * FROM Sum_mdr_8\"
rcsSum_Mdr_8.CursorType = 0
rcsSum_Mdr_8.CursorLocation = 2
rcsSum_Mdr_8.LockType = 3
rcsSum_Mdr_8.Open()
rcsSum_Mdr_8_numRows = 0
%>
<%
set rcsSum_Mdr_9 = Server.CreateObject(\"ADODB.Recordset\")
rcsSum_Mdr_9.ActiveConnection = MM_regnskab_STRING
rcsSum_Mdr_9.Source = \"SELECT * FROM Sum_mdr_9\"
rcsSum_Mdr_9.CursorType = 0
rcsSum_Mdr_9.CursorLocation = 2
rcsSum_Mdr_9.LockType = 3
rcsSum_Mdr_9.Open()
rcsSum_Mdr_9_numRows = 0
%>
<%
set rcsSum_Mdr_10 = Server.CreateObject(\"ADODB.Recordset\")
rcsSum_Mdr_10.ActiveConnection = MM_regnskab_STRING
rcsSum_Mdr_10.Source = \"SELECT * FROM Sum_mdr_10\"
rcsSum_Mdr_10.CursorType = 0
rcsSum_Mdr_10.CursorLocation = 2
rcsSum_Mdr_10.LockType = 3
rcsSum_Mdr_10.Open()
rcsSum_Mdr_10_numRows = 0
%>
<%
set rcsSum_Mdr_11 = Server.CreateObject(\"ADODB.Recordset\")
rcsSum_Mdr_11.ActiveConnection = MM_regnskab_STRING
rcsSum_Mdr_11.Source = \"SELECT * FROM Sum_mdr_11\"
rcsSum_Mdr_11.CursorType = 0
rcsSum_Mdr_11.CursorLocation = 2
rcsSum_Mdr_11.LockType = 3
rcsSum_Mdr_11.Open()
rcsSum_Mdr_11_numRows = 0
%>
<%
set rcsSum_Mdr_12 = Server.CreateObject(\"ADODB.Recordset\")
rcsSum_Mdr_12.ActiveConnection = MM_regnskab_STRING
rcsSum_Mdr_12.Source = \"SELECT * FROM Sum_mdr_12\"
rcsSum_Mdr_12.CursorType = 0
rcsSum_Mdr_12.CursorLocation = 2
rcsSum_Mdr_12.LockType = 3
rcsSum_Mdr_12.Open()
rcsSum_Mdr_12_numRows = 0
%>
<%
Dim Repeat1__numRows
Repeat1__numRows = 9
Dim Repeat1__index
Repeat1__index = 0
rcsPostering_numRows = rcsPostering_numRows + Repeat1__numRows
%>
<%
\' *** Recordset Stats, Move To Record, and Go To Record: declare stats variables
\' set the record count
rcsPostering_total = rcsPostering.RecordCount
\' set the number of rows displayed on this page
If (rcsPostering_numRows < 0) Then
rcsPostering_numRows = rcsPostering_total
Elseif (rcsPostering_numRows = 0) Then
rcsPostering_numRows = 1
End If
\' set the first and last displayed record
rcsPostering_first = 1
rcsPostering_last = rcsPostering_first + rcsPostering_numRows - 1
\' if we have the correct record count, check the other stats
If (rcsPostering_total <> -1) Then
If (rcsPostering_first > rcsPostering_total) Then rcsPostering_first = rcsPostering_total
If (rcsPostering_last > rcsPostering_total) Then rcsPostering_last = rcsPostering_total
If (rcsPostering_numRows > rcsPostering_total) Then rcsPostering_numRows = rcsPostering_total
End If
%>
<%
\' *** Move To Record and Go To Record: declare variables
Set MM_rs = rcsPostering
MM_rsCount = rcsPostering_total
MM_size = rcsPostering_numRows
MM_uniqueCol = \"\"
MM_paramName = \"\"
MM_offset = 0
MM_atTotal = false
MM_paramIsDefined = false
If (MM_paramName <> \"\") Then
MM_paramIsDefined = (Request.QueryString(MM_paramName) <> \"\")
End If
%>
<%
\' *** Move To Record: handle \'index\' or \'offset\' parameter
if (Not MM_paramIsDefined And MM_rsCount <> 0) then
\' use index parameter if defined, otherwise use offset parameter
r = Request.QueryString(\"index\")
If r = \"\" Then r = Request.QueryString(\"offset\")
If r <> \"\" Then MM_offset = Int(r)
\' if we have a record count, check if we are past the end of the recordset
If (MM_rsCount <> -1) Then
If (MM_offset >= MM_rsCount Or MM_offset = -1) Then \' past end or move last
If ((MM_rsCount Mod MM_size) > 0) Then \' last page not a full repeat region
MM_offset = MM_rsCount - (MM_rsCount Mod MM_size)
Else
MM_offset = MM_rsCount - MM_size
End If
End If
End If
\' move the cursor to the selected record
i = 0
While ((Not MM_rs.EOF) And (i < MM_offset Or MM_offset = -1))
MM_rs.MoveNext
i = i + 1
Wend
If (MM_rs.EOF) Then MM_offset = i \' set MM_offset to the last possible record
End If
%>
<%
\' *** Move To Record: if we dont know the record count, check the display range
If (MM_rsCount = -1) Then
\' walk to the end of the display range for this page
i = MM_offset
While (Not MM_rs.EOF And (MM_size < 0 Or i < MM_offset + MM_size))
MM_rs.MoveNext
i = i + 1
Wend
\' if we walked off the end of the recordset, set MM_rsCount and MM_size
If (MM_rs.EOF) Then
MM_rsCount = i
If (MM_size < 0 Or MM_size > MM_rsCount) Then MM_size = MM_rsCount
End If
\' if we walked off the end, set the offset based on page size
If (MM_rs.EOF And Not MM_paramIsDefined) Then
If (MM_offset > MM_rsCount - MM_size Or MM_offset = -1) Then
If ((MM_rsCount Mod MM_size) > 0) Then
MM_offset = MM_rsCount - (MM_rsCount Mod MM_size)
Else
MM_offset = MM_rsCount - MM_size
End If
End If
End If
\' reset the cursor to the beginning
If (MM_rs.CursorType > 0) Then
MM_rs.MoveFirst
Else
MM_rs.Requery
End If
\' move the cursor to the selected record
i = 0
While (Not MM_rs.EOF And i < MM_offset)
MM_rs.MoveNext
i = i + 1
Wend
End If
%>
<%
\' *** Move To Record: update recordset stats
\' set the first and last displayed record
rcsPostering_first = MM_offset + 1
rcsPostering_last = MM_offset + MM_size
If (MM_rsCount <> -1) Then
If (rcsPostering_first > MM_rsCount) Then rcsPostering_first = MM_rsCount
If (rcsPostering_last > MM_rsCount) Then rcsPostering_last = MM_rsCount
End If
\' set the boolean used by hide region to check if we are on the last record
MM_atTotal = (MM_rsCount <> -1 And MM_offset + MM_size >= MM_rsCount)
%>
<%
\' *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters
\' create the list of parameters which should not be maintained
MM_removeList = \"&index=\"
If (MM_paramName <> \"\") Then MM_removeList = MM_removeList & \"&\" & MM_paramName & \"=\"
MM_keepURL=\"\":MM_keepForm=\"\":MM_keepBoth=\"\":MM_keepNone=\"\"
\' add the URL parameters to the MM_keepURL string
For Each Item In Request.QueryString
NextItem = \"&\" & Item & \"=\"
If (InStr(1,MM_removeList,NextItem,1) = 0) Then
MM_keepURL = MM_keepURL & NextItem & Server.URLencode(Request.QueryString(Item))
End If
Next
\' add the Form variables to the MM_keepForm string
For Each Item In Request.Form
NextItem = \"&\" & Item & \"=\"
If (InStr(1,MM_removeList,NextItem,1) = 0) Then
MM_keepForm = MM_keepForm & NextItem & Server.URLencode(Request.Form(Item))
End If
Next
\' create the Form + URL string and remove the intial \'&\' from each of the strings
MM_keepBoth = MM_keepURL & MM_keepForm
if (MM_keepBoth <> \"\") Then MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1)
if (MM_keepURL <> \"\") Then MM_keepURL = Right(MM_keepURL, Len(MM_keepURL) - 1)
if (MM_keepForm <> \"\") Then MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1)
\' a utility function used for adding additional parameters to these strings
Function MM_joinChar(firstItem)
If (firstItem <> \"\") Then
MM_joinChar = \"&\"
Else
MM_joinChar = \"\"
End If
End Function
%>
<%
\' *** Move To Record: set the strings for the first, last, next, and previous links
MM_keepMove = MM_keepBoth
MM_moveParam = \"index\"
\' if the page has a repeated region, remove \'offset\' from the maintained parameters
If (MM_size > 0) Then
MM_moveParam = \"offset\"
If (MM_keepMove <> \"\") Then
params = Split(MM_keepMove, \"&\")
MM_keepMove = \"\"
For i = 0 To UBound(params)
nextItem = Left(params(i), InStr(params(i),\"=\") - 1)
If (StrComp(nextItem,MM_moveParam,1) <> 0) Then
MM_keepMove = MM_keepMove & \"&\" & params(i)
End If
Next
If (MM_keepMove <> \"\") Then
MM_keepMove = Right(MM_keepMove, Len(MM_keepMove) - 1)
End If
End If
End If
\' set the strings for the move to links
If (MM_keepMove <> \"\") Then MM_keepMove = MM_keepMove & \"&\"
urlStr = Request.ServerVariables(\"URL\") & \"?\" & MM_keepMove & MM_moveParam & \"=\"
MM_moveFirst = urlStr & \"0\"
MM_moveLast = urlStr & \"-1\"
MM_moveNext = urlStr & Cstr(MM_offset + MM_size)
prev = MM_offset - MM_size
If (prev < 0) Then prev = 0
MM_movePrev = urlStr & Cstr(prev)
%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">
<script language=\"JavaScript\">
<!--
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName==\"Netscape\")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->
function MM_findObj(n, d) { //v4.0
var p,i,x; if(!d) d=document; if((p=n.indexOf(\"?\"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && document.getElementById) x=document.getElementById(n); return x;
}
function MM_showHideLayers() { //v3.0
var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style; v=(v==\'show\')?\'visible\':(v=\'hide\')?\'hidden\':v; }
obj.visibility=v; }
}
//-->
</script>
<link rel=\"stylesheet\" href=\"std_stylesheet.css\" type=\"text/css\">
</head>
<body bgcolor=\"#FFFFFF\" text=\"#000000\">
<div id=\"Ny_Post\" style=\"position:absolute; width:646px; height:264px; z-index:1; left: 215px; top: 50px\">
<form name=\"postering\" method=\"POST\" action=\"<%=MM_editAction%>\">
<table width=\"70%\" border=\"0\">
<tr>
<td width=\"122\" height=\"19\"><b>Dato:</b></td>
<td width=\"134\" height=\"19\"><b>Beløb:</b></td>
<td width=\"128\" height=\"19\"><b>Art:</b></td>
<td width=\"347\" height=\"19\"><b>Beskrivelse:</b></td>
</tr>
<tr>
<td align=\"center\" width=\"122\">
<input type=\"text\" name=\"txtDato\" size=\"12\" class=\"form\">
</td>
<td align=\"center\" width=\"134\">
<input type=\"text\" name=\"txtBeloeb\" size=\"8\" class=\"form_beloeb\">
</td>
<td align=\"center\" width=\"128\">
<select name=\"slcArt\" class=\"form\">
<%
While (NOT rcsArt.EOF)
%>
<option value=\"<%=(rcsArt.Fields.Item(\"Art\").Value)%>\"><%=(rcsArt.Fields.Item(\"Art\").Value)%></option>
<%
rcsArt.MoveNext()
Wend
If (rcsArt.CursorType > 0) Then
rcsArt.MoveFirst
Else
rcsArt.Requery
End If
%>
</select>
</td>
<td align=\"center\" width=\"347\">
<input type=\"text\" name=\"txtBeskrivelse\" class=\"form\" size=\"50\" align=\"default\">
</td>
</tr>
<%
While ((Repeat1__numRows <> 0) AND (NOT rcsPostering.EOF))
%>
<tr>
<td align=\"center\" width=\"122\"><%=(rcsPostering.Fields.Item(\"Dato\").Value)%> </td>
<td width=\"134\" class=\"td_beloeb\"><%= FormatCurrency((rcsPostering.Fields.Item(\"Beloeb\").Value), 2, -2, -2, -2) %></td>
<td align=\"center\" width=\"128\"><%=(rcsPostering.Fields.Item(\"Art\").Value)%> </td>
<td align=\"center\" width=\"347\"><%=(rcsPostering.Fields.Item(\"Beskrivelse\").Value)%> </td>
</tr>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
rcsPostering.MoveNext()
Wend
%>
</table>
<table width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"2\" class=\"nav_table\">
<tr>
<td height=\"26\" class=\"nav_td\" width=\"27%\"><a href=\"<%=MM_moveFirst%>\">Første</a></td>
<td height=\"26\" class=\"nav_td\" width=\"31%\"><A HREF=\"<%=MM_movePrev%>\">Forrige</A></td>
<td height=\"26\" class=\"nav_td\" width=\"22%\"><A HREF=\"<%=MM_moveNext%>\">Næste</A></td>
<td height=\"26\" class=\"nav_td\" width=\"20%\"><A HREF=\"<%=MM_moveLast%>\">Sidste</A></td>
</tr>
</table>
<p>
<input type=\"submit\" name=\"Indsaet_post\" value=\"Indsæt post\" class=\"form\">
</p>
<p> </p>
<input type=\"hidden\" name=\"MM_insert\" value=\"true\" width=\"100%\">
</form>
</div>
<div id=\"Layer1\" style=\"position:absolute; width:200px; height:115px; z-index:2; left: 12px; top: 60px\">
<form name=\"Mdr\" method=\"post\" action=\"\">
<p>
**************************** HER KOMMER DROPDOWN LISTEN ***************************
<select name=\"Mdr\" onchange=\"this.form.submit()\" class=\"form\">
<option selected>vælg måned</option>
<option>____________</option>
<option>januar</option>
<option>februar</option>
<option>marts</option>
<option>april</option>
<option>maj</option>
<option>juni</option>
<option>juli</option>
<option>august</option>
<option>september</option>
<option>oktober</option>
<option>november</option>
<option>december</option>
</select>
</p>
</form>
<%
temp = request.form(\"Mdr\")
*********************** OG HER STARTER DET HÅRDE ARBEJDE SÅ. SOM DU SER MANGLER DER LIGE ET PAR \"CASES\" *************
Select Case temp
Case \"januar\"
if rcsSum_Art_1.Fields.Item(\"Art\").Value or rcsSum_Mdr_1.Fields.Item(\"Art\").Value <> then
%>
<table width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"2\">
<tr>
<td>Saldo:</td>
<td> </td>
</tr>
<%
while not rcsSum_Art_1.EOF
%>
<tr>
<td><%=(rcsSum_Art_1.Fields.Item(\"Art\").Value)%></td>
<td class=\"td_beloeb\"><%=FormatCurrency((rcsSum_Art_1.Fields.Item(\"SumOfBeloeb\").Value), 2, -2, -2, -2)%></td>
</tr>
<%
rcsSum_Art_1.movenext
wend
%>
<tr>
<td>I alt</td>
<td class=\"td_beloeb\"><%=FormatCurrency((rcsSum_Mdr_1.Fields.Item(\"SumOfBeloeb\").Value), 2, -2, -2, -2)%></td>
</tr>
</table>
<%
else
%>
<table width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"2\">
<tr>
<td>Der er ingen tilgængeliged ata</td>
</tr>
</table>
<%
Case \"februar\"
%>
<table width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"2\">
<tr>
<td>Saldo:</td>
<td> </td>
</tr>
<%
while not rcsSum_Art_2.EOF
%>
<tr>
<td><%=(rcsSum_Art_2.Fields.Item(\"Art\").Value)%></td>
<td class=\"td_beloeb\"><%=FormatCurrency((rcsSum_Art_2.Fields.Item(\"SumOfBeloeb\").Value), 2, -2, -2, -2)%></td>
</tr>
<%
rcsSum_Art_2.movenext
wend
%>
<tr>
<td>I alt</td>
<td class=\"td_beloeb\"><%=FormatCurrency((rcsSum_Mdr_2.Fields.Item(\"SumOfBeloeb\").Value), 2, -2, -2, -2)%></td>
</tr>
</table>
<%
Case \"marts\"
%>
<table width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"2\">
<tr>
<td>Saldo:</td>
<td> </td>
</tr>
<%
while not rcsSum_Art_3.EOF
%>
<tr>
<td><%=(rcsSum_Art_3.Fields.Item(\"Art\").Value)%></td>
<td class=\"td_beloeb\"><%=FormatCurrency((rcsSum_Art_3.Fields.Item(\"SumOfBeloeb\").Value), 2, -2, -2, -2)%></td>
</tr>
<%
rcsSum_Art_3.movenext
wend
%>
<tr>
<td>I alt</td>
<td class=\"td_beloeb\"><%=FormatCurrency((rcsSum_Mdr_3.Fields.Item(\"SumOfBeloeb\").Value), 2, -2, -2, -2)%></td>
</tr>
</table>
<%
Case \"april\"
%>
<table width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"2\">
<tr>
<td>Saldo:</td>
<td> </td>
</tr>
<%
while not rcsSum_Art_4.EOF
%>
<tr>
<td><%=(rcsSum_Art_4.Fields.Item(\"Art\").Value)%></td>
<td class=\"td_beloeb\"><%=FormatCurrency((rcsSum_Art_4.Fields.Item(\"SumOfBeloeb\").Value), 2, -2, -2, -2)%></td>
</tr>
<%
rcsSum_Art_4.movenext
wend
%>
<tr>
<td>I alt</td>
<td class=\"td_beloeb\"><%=FormatCurrency((rcsSum_Mdr_4.Fields.Item(\"SumOfBeloeb\").Value), 2, -2, -2, -2)%></td>
</tr>
</table>
<%
Case \"maj\"
%>
<table width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"2\">
<tr>
<td>Saldo:</td>
<td> </td>
</tr>
<%
while not rcsSum_Art_5.EOF
%>
<tr>
<td><%=(rcsSum_Art_5.Fields.Item(\"Art\").Value)%></td>
<td class=\"td_beloeb\"><%=FormatCurrency((rcsSum_Art_5.Fields.Item(\"SumOfBeloeb\").Value), 2, -2, -2, -2)%></td>
</tr>
<%
rcsSum_Art_5.movenext
wend
%>
<tr>
<td>I alt</td>
<td class=\"td_beloeb\"><%=FormatCurrency((rcsSum_Mdr_5.Fields.Item(\"SumOfBeloeb\").Value), 2, -2, -2, -2)%></td>
</tr>
</table>
<%
Case \"juni\"
%>
<table width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"2\">
<tr>
<td>Saldo:</td>
<td> </td>
</tr>
<%
while not rcsSum_Art_6.EOF
%>
<tr>
<td><%=(rcsSum_Art_6.Fields.Item(\"Art\").Value)%></td>
<td><%=(rcsSum_Art_6.Fields.Item(\"SumOfBeloeb\").Value)%></td>
</tr>
<%
rcsSum_Art_6.movenext
wend
%>
<tr>
<td>I alt</td>
<td><%=(rcsSum_Mdr_6.Fields.Item(\"SumOfBeloeb\").Value)%></td>
</tr>
</table>
<%
Case \"juli\"
%>
<table width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"2\">
<tr>
<td>Saldo:</td>
<td> </td>
</tr>
<%
while not rcsSum_Art_7.EOF
%>
<tr>
<td><%=(rcsSum_Art_7.Fields.Item(\"Art\").Value)%></td>
<td class=\"td_beloeb\"><%=FormatCurrency((rcsSum_Art_7.Fields.Item(\"SumOfBeloeb\").Value), 2, -2, -2, -2)%></td>
</tr>
<%
rcsSum_Art_7.movenext
wend
%>
<tr>
<td>I alt</td>
<td class=\"td_beloeb\"><%=FormatCurrency((rcsSum_Mdr_7.Fields.Item(\"SumOfBeloeb\").Value), 2, -2, -2, -2)%></td>
</tr>
</table>
<%
Case \"august\"
%>
<table width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"2\">
<tr>
<td>Saldo:</td>
<td> </td>
</tr>
<%
while not rcsSum_Art_8.EOF
%>
<tr>
<td><%=(rcsSum_Art_8.Fields.Item(\"Art\").Value)%></td>
<td class=\"td_beloeb\"><%=FormatCurrency((rcsSum_Art_8.Fields.Item(\"SumOfBeloeb\").Value), 2, -2, -2, -2)%></td>
</tr>
<%
rcsSum_Art_8.movenext
wend
%>
<tr>
<td>I alt</td>
<td class=\"td_beloeb\"><%=FormatCurrency((rcsSum_Mdr_8.Fields.Item(\"SumOfBeloeb\").Value), 2, -2, -2, -2)%></td>
</tr>
</table>
<%
Case \"september\"
%>
<table width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"2\">
<tr>
<td>Saldo:</td>
<td> </td>
</tr>
<%
while not rcsSum_Art_9.EOF
%>
<tr>
<td><%=(rcsSum_Art_9.Fields.Item(\"Art\").Value)%></td>
<td class=\"td_beloeb\"><%=FormatCurrency((rcsSum_Art_9.Fields.Item(\"SumOfBeloeb\").Value), 2, -2, -2, -2)%></td>
</tr>
<%
rcsSum_Art_9.movenext
wend
%>
<tr>
<td>I alt</td>
<td class=\"td_beloeb\"><%=FormatCurrency((rcsSum_Mdr_9.Fields.Item(\"SumOfBeloeb\").Value), 2, -2, -2, -2)%></td>
</tr>
</table>
<%
Case \"oktober\"
%>
<table width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"2\">
<tr>
<td>Saldo:</td>
<td> </td>
</tr>
<%
while not rcsSum_Art_10.EOF
%>
<tr>
<td><%=(rcsSum_Art_10.Fields.Item(\"Art\").Value)%></td>
<td class=\"td_beloeb\"><%=FormatCurrency((rcsSum_Art_10.Fields.Item(\"SumOfBeloeb\").Value), 2, -2, -2, -2)%></td>
</tr>
<%
rcsSum_Art_10.movenext
wend
%>
<tr>
<td>I alt</td>
<td class=\"td_beloeb\"><%=FormatCurrency((rcsSum_Mdr_10.Fields.Item(\"SumOfBeloeb\").Value), 2, -2, -2, -2)%></td>
</tr>
</table>
<%
Case \"november\"
%>
<table width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"2\">
<tr>
<td>Saldo:</td>
<td> </td>
</tr>
<%
while not rcsSum_Art_11.EOF
%>
<tr>
<td><%=(rcsSum_Art_11.Fields.Item(\"Art\").Value)%></td>
<td class=\"td_beloeb\"><%=FormatCurrency((rcsSum_Art_11.Fields.Item(\"SumOfBeloeb\").Value), 2, -2, -2, -2)%></td>
</tr>
<%
rcsSum_Art_11.movenext
wend
%>
<tr>
<td>I alt</td>
<td class=\"td_beloeb\"><%=FormatCurrency((rcsSum_Mdr_11.Fields.Item(\"SumOfBeloeb\").Value), 2, -2, -2, -2)%></td>
</tr>
</table>
<%
Case \"december\"
%>
<table width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"2\">
<tr>
<td>Saldo:</td>
<td> </td>
</tr>
<%
while not rcsSum_Art_12.EOF
%>
<tr>
<td><%=(rcsSum_Art_12.Fields.Item(\"Art\").Value)%></td>
<td class=\"td_beloeb\"><%=FormatCurrency((rcsSum_Art_12.Fields.Item(\"SumOfBeloeb\").Value), 2, -2, -2, -2)%></td>
</tr>
<%
rcsSum_Art_12.movenext
wend
%>
<tr>
<td>I alt</td>
<td class=\"td_beloeb\"><%=FormatCurrency((rcsSum_Mdr_12.Fields.Item(\"SumOfBeloeb\").Value), 2, -2, -2, -2)%></td>
</tr>
</table>
<%
end select
%>
</div>
</body>
</html>
<%
rcsPostering.Close()
%>
<%
rcsArt.Close()
%>
<%
rcsSum.Close()
%>
<%
Saldo_ialt.Close()
%>
<%
rcsSum_Mdr.Close()
%>
<%
rcsSum_Art_1.Close()
%>
<%
rcsSum_Art_2.Close()
%>
<%
rcsSum_Art_3.Close()
%>
<%
rcsSum_Art_4.Close()
%>
<%
rcsSum_Art_5.Close()
%>
<%
rcsSum_Art_6.Close()
%>
<%
rcsSum_Art_7.Close()
%>
<%
rcsSum_Art_8.Close()
%>
<%
rcsSum_Art_9.Close()
%>
<%
rcsSum_Art_10.Close()
%>
<%
rcsSum_Art_11.Close()
%>
<%
rcsSum_Art_12.Close()
%>
<%
rcsSum_Mdr_1.Close()
%>
<%
rcsSum_Mdr_2.Close()
%>
<%
rcsSum_Mdr_3.Close()
%>
<%
rcsSum_Mdr_4.Close()
%>
<%
rcsSum_Mdr_5.Close()
%>
<%
rcsSum_Mdr_6.Close()
%>
<%
rcsSum_Mdr_7.Close()
%>
<%
rcsSum_Mdr_8.Close()
%>
<%
rcsSum_Mdr_9.Close()
%>
<%
rcsSum_Mdr_10.Close()
%>
<%
rcsSum_Mdr_11.Close()
%>
<%
rcsSum_Mdr_12.Close()
%>