× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.





So far, I have the following in the WebQueryOpen section of the form:

     @Command([ToolsRunMacro]; "PopulateFields")

and the following code in the PopulateFields agent. On a side note, even if
I remove all this code from Initialize and simply put a Print statement in
there, it doesnt even show the text that I print.

-----
Uselsx "*LSXODBC"
Sub Initialize
     On Error Goto ErrorHandler

     Dim DBC As New ODBCCOnnection
     Dim DBQ As New ODBCQuery
     Dim DBR As New ODBCResultSet

     Set DBQ.Connection = DBC
     Set DBR.Query = DBQ

     Dim NS As New NotesSession
     Dim ND As NotesDocument
     Set ND = NS.DocumentContext

     Dim dbUser As String, dbPass As String, qStr As String, qDat As
String, qUsr As String
     dbUser = "notesdb"
     dbPass = "notesdb"

     qStr = ND.Query_String(0)
     If Instr(qStr, "&") = 0 Then
          Print "<B>Invalid document identifier.</B>"
          Exit Sub
     End If

     qLen = Len(qStr)
     qPos = Instr(qStr, "&")
     qUsr = Mid(DocID, 1, qPos - 1)
     qUsr = Ucase(qUsr)
     qDat = Mid(DocID, qPos + 1, qLen - qPos)

     If Not DBC.ConnectTo("COLUMBIA", dbUser, dbPass) Then
          Print "<B>CRITICAL ERROR ENCOUNTERED while connecting to
database:</B>"
          PrintDBErrors DBC, DBQ, DBR
          Exit Sub
     End If

     startDate = GetSunday( qDat )
     endDate = GetSaturday( qDat )

     DBQ.SQL = "SELECT * FROM ITSR5CSTM.SLSPLANPF WHERE SPUSER='" & qUsr &
"' AND SPDAT >= " & startDate & " AND SPDAT <= " & endDate

     Print DBQ.SQL & "<P>"

ErrorHandler:
     Print "Script error (initialize): " & Error & "<P>"
     Exit Sub

End Sub
-----

Any ideas?

Thanks,

Brian Cline
G&P Trucking Company
clib@gptruck.com
800.922.1147



As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.