Forums

This topic is locked

Syntax error missing operator in query expressio

Posted 14 Mar 2002 02:29:21
1
has voted
14 Mar 2002 02:29:21 frog jumps posted:
<font face='Tahoma'>I cannot figure this one out...any idea...besides that I may be a moron...

SQL:

SELECT Customers.CustID, Customers.CompanyName, Customers.ContactFirstName, Customers.ContactLastName, Customers.Address, Customers.Address2, Customers.Address3, Customers.City, Customers.State, Customers.ZipCode, Customers.PhoneNumber, Customers.FaxNumber, Customers.AltPhone, Notes.TaskID, Notes.nCustID, Notes.Employee, Notes.Time, Notes.Date, Notes.Note
FROM Customers LEFT JOIN Notes ON Notes.nCustID=Customers.CustID GROUP BY Customers.CustID, Customers.CompanyName, Customers.ContactFirstName, Customers.ContactLastName, Customers.Address, Customers.Address2, Customers.Address3, Customers.City, Customers.State, Customers.ZipCode, Customers.PhoneNumber, Customers.FaxNumber, Customers.AltPhone, Notes.TaskID, Notes.nCustID, Notes.Employee, Notes.Time, Notes.Date, Notes.Note ORDER BY Customers.CustID, Customers.CompanyName, Customers.ContactFirstName, Customers.ContactLastName, Customers.Address, Customers.Address2, Customers.Address3, Customers.City, Customers.State, Customers.ZipCode, Customers.PhoneNumber, Customers.FaxNumber, Customers.AltPhone, Notes.TaskID, Notes.nCustID, Notes.Employee, Notes.Time, Notes.Date, Notes.Note
WHERE CustID = varNote

Variable:

Name : varNote
Default value: 1
Runtime value: Request.QueryString("Customers.CustID"</font id='Tahoma'>

Replies

Replied 15 Mar 2002 18:31:13
15 Mar 2002 18:31:13 Michael Rudge replied:
is this an Access written query?

Michael Rudge
Replied 15 Mar 2002 22:32:09
15 Mar 2002 22:32:09 Dennis van Galen replied:
you're no moron, Access stops the LEFT JOIN when you add a WHERE clause.
Don't get me wrong, it will still join the tables, but only returns records where there's entries for the filter you set. I'm also trying to figure this out, but to save the big hairy SQL i took this approach:
SELECT *
FROM Employees LEFT OUTER JOIN Knowledge ON Employees.EmployeeID = Knowledge.EmployeeID

This works perfectly, until I start to filter for the logged on user, it stops grabbing the Employees entries where there is no relational Knowledge entry. The WHERE kills it leaving me with apparently no other option but to write a subroutine to check each individual entry for a corresponding one. My guess is SQL server will also refuse to LEFT OUTER JOIN when you add a WHERE, since a colleague of mine encountered a similar problem using SQL server 7.

I have a SQL course coming up next week, I will ask this and won't stop bugging him until he fixes it.

With kind regards,

Dennis van Galen
Webmaster KPN Services
Financial and Information Services
Replied 17 Mar 2002 03:27:19
17 Mar 2002 03:27:19 frog jumps replied:
<font face='Tahoma'>hey...i would love to hear how this is solved as this project has been on HOLD for over a month...</font id='Tahoma'>

FrOg 8)

If u r livin' on the edge, then u r not livin'...jump!
Replied 27 Mar 2002 06:29:45
27 Mar 2002 06:29:45 frog jumps replied:
<font face='Tahoma'>here's what we came up with to solve the query problem...

&lt;%@LANGUAGE="VBSCRIPT"%&gt;
&lt;!--#include file="Connections/connOLEDB_TCubed.asp" --&gt;
&lt;%
'set rsCustomers = Server.CreateObject("ADODB.Recordset"
'rsCustomers.ActiveConnection = MM_connOLEDB_TCubed_STRING
'rsCustomers.Source = "SELECT * FROM Customers"
'rsCustomers.CursorType = 0
'rsCustomers.CursorLocation = 2
'rsCustomers.LockType = 3
'rsCustomers.Open()
'rsCustomers_numRows = 0
%&gt;
&lt;%
'set rsNotes = Server.CreateObject("ADODB.Recordset"
'rsNotes.ActiveConnection = MM_connOLEDB_TCubed_STRING
'rsNotes.Source = "SELECT * FROM Notes"
'rsNotes.CursorType = 0
'rsNotes.CursorLocation = 2
'rsNotes.LockType = 3
'rsNotes.Open()
'rsNotes_numRows = 0
%&gt;
&lt;%
' data shaping gratis T-Cubed
Dim DataShapeSQL
DataShapeSQL = "SHAPE {SELECT * FROM Customers}"
DataShapeSQL = DataShapeSQL & "APPEND ({SELECT * FROM Notes}"
DataShapeSQL = DataShapeSQL & "RELATE CustID TO nCustID) AS rsNotes_Link"
set rsCustomers = Server.CreateObject("ADODB.Recordset"
rsCustomers.Open DataShapeSQL, MM_connOLEDB_TCubed_STRING
%&gt;
&lt;%
Dim Repeat1__numRows
Repeat1__numRows = 1
Dim Repeat1__index
Repeat1__index = 0
rsCustomers_numRows = rsCustomers_numRows + Repeat1__numRows
%&gt;
&lt;%
' *** Recordset Stats, Move To Record, and Go To Record: declare stats variables

' set the record count
rsCustomers_total = rsCustomers.RecordCount

' set the number of rows displayed on this page
If (rsCustomers_numRows &lt; 0) Then
rsCustomers_numRows = rsCustomers_total
Elseif (rsCustomers_numRows = 0) Then
rsCustomers_numRows = 1
End If

' set the first and last displayed record
rsCustomers_first = 1
rsCustomers_last = rsCustomers_first + rsCustomers_numRows - 1

' if we have the correct record count, check the other stats
If (rsCustomers_total &lt;&gt; -1) Then
If (rsCustomers_first &gt; rsCustomers_total) Then rsCustomers_first = rsCustomers_total
If (rsCustomers_last &gt; rsCustomers_total) Then rsCustomers_last = rsCustomers_total
If (rsCustomers_numRows &gt; rsCustomers_total) Then rsCustomers_numRows = rsCustomers_total
End If
%&gt;
&lt;%
' *** Move To Record and Go To Record: declare variables

Set MM_rs = rsCustomers
MM_rsCount = rsCustomers_total
MM_size = rsCustomers_numRows
MM_uniqueCol = ""
MM_paramName = ""
MM_offset = 0
MM_atTotal = false
MM_paramIsDefined = false
If (MM_paramName &lt;&gt; "" Then
MM_paramIsDefined = (Request.QueryString(MM_paramName) &lt;&gt; ""
End If
%&gt;
&lt;%
' *** Move To Record: handle 'index' or 'offset' parameter

if (Not MM_paramIsDefined And MM_rsCount &lt;&gt; 0) then

' use index parameter if defined, otherwise use offset parameter
r = Request.QueryString("index"
If r = "" Then r = Request.QueryString("offset"
If r &lt;&gt; "" Then MM_offset = Int(r)

' if we have a record count, check if we are past the end of the recordset
If (MM_rsCount &lt;&gt; -1) Then
If (MM_offset &gt;= MM_rsCount Or MM_offset = -1) Then ' past end or move last
If ((MM_rsCount Mod MM_size) &gt; 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 &lt; 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
%&gt;
&lt;%
' *** 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 &lt; 0 Or i &lt; 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 &lt; 0 Or MM_size &gt; 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 &gt; MM_rsCount - MM_size Or MM_offset = -1) Then
If ((MM_rsCount Mod MM_size) &gt; 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 &gt; 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 &lt; MM_offset)
MM_rs.MoveNext
i = i + 1
Wend
End If
%&gt;
&lt;%
' *** Move To Record: update recordset stats

' set the first and last displayed record
rsCustomers_first = MM_offset + 1
rsCustomers_last = MM_offset + MM_size
If (MM_rsCount &lt;&gt; -1) Then
If (rsCustomers_first &gt; MM_rsCount) Then rsCustomers_first = MM_rsCount
If (rsCustomers_last &gt; MM_rsCount) Then rsCustomers_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 &lt;&gt; -1 And MM_offset + MM_size &gt;= MM_rsCount)
%&gt;
&lt;%
' *** 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 &lt;&gt; "" 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 &lt;&gt; "" Then MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1)
if (MM_keepURL &lt;&gt; "" Then MM_keepURL = Right(MM_keepURL, Len(MM_keepURL) - 1)
if (MM_keepForm &lt;&gt; "" 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 &lt;&gt; "" Then
MM_joinChar = "&"
Else
MM_joinChar = ""
End If
End Function
%&gt;
&lt;%
' *** 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 &gt; 0) Then
MM_moveParam = "offset"
If (MM_keepMove &lt;&gt; "" 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) &lt;&gt; 0) Then
MM_keepMove = MM_keepMove & "&" & params(i)
End If
Next
If (MM_keepMove &lt;&gt; "" 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 &lt;&gt; "" 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 &lt; 0) Then prev = 0
MM_movePrev = urlStr & Cstr(prev)
%&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;The Direct Hit&lt;/title&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"&gt;
&lt;script language="JavaScript"&gt;
&lt;!--
function GP_AdvOpenWindow(theURL,winName,features,popWidth,popHeight,winAlign,ignorelink,alwaysOnTop,autoCloseTime,borderless) { //v2.0
var leftPos=0,topPos=0,autoCloseTimeoutHandle, ontopIntervalHandle, w = 480, h = 340;
if (popWidth &gt; 0) features += (features.length &gt; 0 ? ',' : '') + 'width=' + popWidth;
if (popHeight &gt; 0) features += (features.length &gt; 0 ? ',' : '') + 'height=' + popHeight;
if (winAlign && winAlign != "" && popWidth &gt; 0 && popHeight &gt; 0) {
if (document.all || document.layers || document.getElementById) {w = screen.availWidth; h = screen.availHeight;}
if (winAlign.indexOf("center" != -1) {topPos = (h-popHeight)/2;leftPos = (w-popWidth)/2;}
if (winAlign.indexOf("bottom" != -1) topPos = h-popHeight; if (winAlign.indexOf("right" != -1) leftPos = w-popWidth;
if (winAlign.indexOf("left" != -1) leftPos = 0; if (winAlign.indexOf("top" != -1) topPos = 0;
features += (features.length &gt; 0 ? ',' : '') + 'top=' + topPos+',left='+leftPos;}
if (document.all && borderless && borderless != "" && features.indexOf("fullscreen" != -1) features+=",fullscreen=1";
if (window["popupWindow"] == null) window["popupWindow"] = new Array();
var wp = popupWindow.length;
popupWindow[wp] = window.open(theURL,winName,features);
if (popupWindow[wp].opener == null) popupWindow[wp].opener = self;
if (document.all || document.layers || document.getElementById) {
if (borderless && borderless != "" {popupWindow[wp].resizeTo(popWidth,popHeight); popupWindow[wp].moveTo(leftPos, topPos);}
if (alwaysOnTop && alwaysOnTop != "" {
ontopIntervalHandle = popupWindow[wp].setInterval("window.focus();", 50);
popupWindow[wp].document.body.onload = function() {window.setInterval("window.focus();", 50);}; }
if (autoCloseTime && autoCloseTime &gt; 0) {
popupWindow[wp].document.body.onbeforeunload = function() {
if (autoCloseTimeoutHandle) window.clearInterval(autoCloseTimeoutHandle);
window.onbeforeunload = null; }
autoCloseTimeoutHandle = window.setTimeout("popupWindow["+wp+"].close()", autoCloseTime * 1000); }
window.onbeforeunload = function() {for (var i=0;i&lt;popupWindow.length;i++) popupWindow[i].close();}; }
document.MM_returnValue = (ignorelink && ignorelink != "" ? false : true;
}
//--&gt;
&lt;/script&gt;
&lt;/head&gt;
&lt;body text="#000000" link="#0000FF" vlink="#FF0000" alink="#FFFF00" bgcolor="#FFFFFF"&gt;
&lt;font size="2"&gt; &lt;font color="#333333"&gt;&lt;img src="/fireworks/directhit.png" width="160" height="20"&gt;&lt;br&gt;
&lt;br&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font size="2" color="#333333"&gt;&lt;a href="&lt;%=MM_moveFirst%&gt;"&gt;&lt;font face="Tahoma"&gt;First&lt;/font&gt;&lt;/a&gt;&lt;font face="Tahoma"&gt;
| &lt;a href="&lt;%=MM_moveNext%&gt;"&gt;Next&lt;/a&gt;
| &lt;a href="&lt;%=MM_movePrev%&gt;"&gt;Previous&lt;/a&gt;
| &lt;a href="&lt;%=MM_moveLast%&gt;"&gt;Last&lt;/a&gt;&lt;/font&gt;&lt;/font&gt;&lt;br&gt;
&lt;%' insert custom datashaping table here %&gt;
&lt;form name="Form1" action="/modify.asp" method="POST"&gt;
&lt;font face="Tahoma"&gt;&lt;font face="Tahoma"&gt;&lt;font face="Tahoma" color="#333333"&gt;&lt;font size="2"&gt;&lt;A HREF="/modify.asp?&lt;%= MM_keepURL & MM_joinChar(MM_keepURL) & "CustID=" & rsCustomers.Fields.Item("CustID".Value %&gt;"&gt;Modify
Record&lt;/A&gt;&lt;/font&gt; &lt;font size="2"&gt;| &lt;A HREF="/insert.asp?&lt;%= MM_keepURL & MM_joinChar(MM_keepURL) & "CustID=" & rsCustomers.Fields.Item("CustID".Value %&gt;"&gt;Insert
New Record&lt;/A&gt; | &lt;A HREF="/delete.asp?&lt;%= MM_keepURL & MM_joinChar(MM_keepURL) & "CustID=" & rsCustomers.Fields.Item("CustID".Value %&gt;"&gt;Delete
Current Record&lt;/A&gt; |&lt;/font&gt; &lt;font size="2"&gt;Schedule Call | Invoice | &lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;br&gt;
&lt;font face="Tahoma" size="2"&gt;&lt;font color="#333333"&gt;| &lt;font color="#0000CC" onClick="GP_AdvOpenWindow('/ins_note.asp?&lt;%= MM_keepURL & MM_joinChar(MM_keepURL) & "CustID=" & rsCustomers.Fields.Item("CustID".Value %&gt;','InsertNote','fullscreen=no,toolbar=no,location=no,status=no,menubar=yes,scrollbars=no,resizable=yes',400,300,'center','','',0,'');return document.MM_returnValue"&gt;Insert
Note&lt;/font&gt; |&lt;/font&gt; Activities | Quote | Invoice |&lt;/font&gt;&lt;font face="Tahoma" size="2"&gt;&lt;/font&gt;&lt;font face="Tahoma" size="2"&gt;&lt;/font
&gt;&lt;br&gt;
&lt;table border="0" width="797"&gt;
&lt;%
While ((Repeat1__numRows &lt;&gt; 0) AND (NOT rsCustomers.EOF))
%&gt;
&lt;tr&gt;
&lt;td align="right" colspan="5"&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td align="right" width="111"&gt;
&lt;div align="left"&gt;&lt;font face="Tahoma" color="#000000" size="2.5"&gt;Customer
#&lt;/font&gt;&lt;/div&gt;
&lt;/td&gt;
&lt;td colspan="2"&gt;&lt;font size="2.5" color="#000000" face="Tahoma"&gt;&lt;%=(rsCustomers.Fields.Item("CustID".Value)%&gt;&lt;/font&gt;&lt;/td&gt;
&lt;td width="93"&gt;&lt;font face="Tahoma" color="#000000" size="2.5"&gt;Address&lt;/font&gt;&lt;/td&gt;
&lt;td width="198"&gt;&lt;font face="Tahoma" color="#000000" size="2.5"&gt;&lt;%=(rsCustomers.Fields.Item("Address".Value)%&gt;&lt;/font&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td align="right" width="111"&gt;
&lt;div align="left"&gt;&lt;font face="Tahoma" color="#000000" size="2.5"&gt;Customer's
Name&lt;/font&gt;&lt;/div&gt;
&lt;/td&gt;
&lt;td colspan="2"&gt;&lt;font face="Tahoma" color="#000000" size="2.5"&gt;&lt;%=(rsCustomers.Fields.Item("CompanyName".Value)%&gt;&lt;/font&gt;&lt;/td&gt;
&lt;td width="93"&gt;&lt;font face="Tahoma" color="#000000" size="2.5"&gt;Address
line 2&lt;/font&gt;&lt;/td&gt;
&lt;td width="198"&gt;&lt;font face="Tahoma" color="#000000" size="2.5"&gt;&lt;%=(rsCustomers.Fields.Item("Address2".Value)%&gt;&lt;/font&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td align="right" width="111"&gt;
&lt;div align="left"&gt;&lt;font face="Tahoma" color="#000000" size="2.5"&gt;Contact&lt;/font&gt;&lt;/div&gt;
&lt;/td&gt;
&lt;td colspan="2"&gt;&lt;font face="Tahoma" color="#000000" size="2.5"&gt;&lt;%=(rsCustomers.Fields.Item("ContactFirstName".Value)%&gt;&lt;%=(rsCustomers.Fields.Item("ContactLastName".Value)%&gt;&lt;/font&gt;&lt;/td&gt;
&lt;td width="93"&gt;&lt;font face="Tahoma" color="#000000" size="2.5"&gt;Address
line 3&lt;/font&gt;&lt;/td&gt;
&lt;td width="198"&gt;&lt;font face="Tahoma" color="#000000" size="2.5"&gt;&lt;%=(rsCustomers.Fields.Item("Address3".Value)%&gt;&lt;/font&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td align="right" width="111"&gt;
&lt;div align="left"&gt;&lt;font face="Tahoma" color="#000000" size="2.5"&gt;Alternate
Contact&lt;/font&gt;&lt;/div&gt;
&lt;/td&gt;
&lt;td colspan="2"&gt;&lt;font face="Tahoma" color="#000000" size="2.5"&gt;&lt;/font&gt;&lt;/td&gt;
&lt;td width="93"&gt;&lt;font face="Tahoma" color="#000000" size="2.5"&gt;City&lt;/font&gt;&lt;/td&gt;
&lt;td width="198"&gt;&lt;font face="Tahoma" color="#000000" size="2.5"&gt;&lt;%=(rsCustomers.Fields.Item("City".Value)%&gt;&lt;/font&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td align="right" width="111"&gt;
&lt;div align="left"&gt;&lt;font face="Tahoma" color="#000000" size="2.5"&gt;Phone
#&lt;/font&gt;&lt;/div&gt;
&lt;/td&gt;
&lt;td colspan="2"&gt;
&lt;font face="Tahoma" color="#000000" size="2.5"&gt;&lt;%=(rsCustomers.Fields.Item("PhoneNumber".Value)%&gt;&lt;/font&gt;&lt;/td&gt;
&lt;td width="93"&gt;&lt;font face="Tahoma" color="#000000" size="2.5"&gt;State&lt;/font&gt;&lt;/td&gt;
&lt;td width="198"&gt;&lt;font face="Tahoma" color="#000000" size="2.5"&gt;&lt;%=(rsCustomers.Fields.Item("State".Value)%&gt;&lt;/font&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td align="right" width="111"&gt;
&lt;div align="left"&gt;&lt;font face="Tahoma" color="#000000" size="2.5"&gt;Alternate
Phone #&lt;/font&gt;&lt;/div&gt;
&lt;/td&gt;
&lt;td colspan="2"&gt;
&lt;font face="Tahoma" color="#000000" size="2.5"&gt;&lt;%=(rsCustomers.Fields.Item("AltPhone".Value)%&gt;&lt;/font&gt;&lt;/td&gt;
&lt;td width="93"&gt;&lt;font face="Tahoma" color="#000000" size="2.5"&gt;Zip
Code&lt;/font&gt;&lt;/td&gt;
&lt;td width="198"&gt;&lt;font face="Tahoma" color="#000000" size="2.5"&gt;&lt;%=(rsCustomers.Fields.Item("ZipCode".Value)%&gt;&lt;/font&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td align="right" width="111"&gt;
&lt;div align="left"&gt;&lt;font face="Tahoma" color="#000000" size="2.5"&gt;Fax #&lt;/font&gt;&lt;/div&gt;
&lt;/td&gt;
&lt;td colspan="2"&gt;
&lt;font face="Tahoma" color="#000000" size="2.5"&gt;&lt;%=(rsCustomers.Fields.Item("FaxNumber".Value)%&gt;&lt;/font&gt;&lt;/td&gt;
&lt;td width="93"&gt;&lt;font color="#000000" face="Tahoma" size="2.5"&gt;eMail&lt;/font&gt;&lt;/td&gt;
&lt;td width="198"&gt;&lt;font color="#000000" size="2.5" face="Tahoma"&gt;&lt;/font&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td align="right" width="111"&gt;
&lt;/td&gt;
&lt;td colspan="2"&gt;&lt;font size="2.5"&gt;&lt;/font&gt;&lt;/td&gt;
&lt;td width="93"&gt;&nbsp;&lt;/td&gt;
&lt;td width="198"&gt;&nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td align="right" width="111"&gt;&lt;font face="Tahoma" size="4"&gt;&lt;font size="2"&gt;Account
History&lt;/font&gt;&lt;/font&gt;&lt;font face="Tahoma" size="2"&gt; &lt;/font&gt;&lt;font face="Tahoma" size="2"&gt;&lt;/font&gt;&lt;/td&gt;
&lt;td colspan="2"&gt;&lt;font size="2.5"&gt;&lt;/font&gt;&lt;/td&gt;
&lt;td width="93"&gt;&nbsp;&lt;/td&gt;
&lt;td width="198"&gt;&nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr bgcolor="#66CCFF"&gt;
&lt;td align="right" width="111"&gt;
&lt;div align="left"&gt;&lt;i&gt;&lt;font face="Tahoma" size="2.5"&gt;Date&lt;/font&gt;&lt;/i&gt;&lt;/div&gt;
&lt;/td&gt;
&lt;td width="69"&gt;&lt;font size="2.5"&gt;&lt;/font&gt;&lt;/td&gt;
&lt;td width="304"&gt;&lt;i&gt;&lt;font face="Tahoma" size="2.5"&gt;Notes&lt;/font&gt;&lt;/i&gt;&lt;/td&gt;
&lt;td width="93"&gt;&lt;i&gt;&lt;font face="Tahoma" size="2.5"&gt;Time&lt;/font&gt;&lt;/i&gt;&lt;/td&gt;
&lt;td width="198"&gt;&lt;i&gt;&lt;font face="Tahoma" size="2.5"&gt;Salesman&lt;/font&gt;&lt;/i&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;%
Set rsNotes = rsCustomers("rsNotes_Link".Value
While NOT rsNotes.EOF
%&gt;
&lt;%If (Repeat1__numRows Mod 2) Then%&gt;
&lt;tr bgcolor="#CCCCCC"&gt;
&lt;%Else%&gt;
&lt;tr bgcolor="#FFFFFF"&gt;
&lt;%End If%&gt;
&lt;td align="right" width="111"&gt;
&lt;div align="left"&gt;&lt;font face="Tahoma" size="2" color="#000000"&gt;&lt;%=(rsNotes.Fields.Item("Date".Value)%&gt;&lt;/font&gt;&lt;/div&gt;
&lt;/td&gt;
&lt;td colspan="2"&gt;&lt;font face="Tahoma" size="2.5" color="#000000"&gt;&lt;%=(rsNotes.Fields.Item("Note".Value)%&gt;&lt;/font&gt;&lt;/td&gt;
&lt;td width="93"&gt;&lt;font face="Tahoma" size="2" color="#000000"&gt;&lt;%=(rsNotes.Fields.Item("Time".Value)%&gt;&lt;/font&gt;&lt;/td&gt;
&lt;td width="198"&gt;&lt;font face="Tahoma" size="2" color="#000000"&gt;&lt;%=(rsNotes.Fields.Item("Employee".Value)%&gt;&lt;/font&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;%
rsNotes.MoveNext
Wend
%&gt;
&lt;%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
rsCustomers.MoveNext()
Wend
%&gt;
&lt;/table&gt;
&lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;
&lt;%
rsCustomers.Close()
%&gt;
&lt;%
rsNotes.Close()
%&gt;
</font id='Tahoma'>

FrOg 8)
can't sleep, source-code will eat me !!!
can't sleep, source-code will eat me !!!
can't sleep, source-code will eat me !!!

www24.brinkster.com/frogjumps/

If u r livin' on the edge, then u r not livin'...jump!

Reply to this topic