Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SearchFromula$ syntax

Status
Not open for further replies.

batteam

Programmer
Sep 12, 2003
374
US
I am tasked with extracting data from IBM Lotus Notes db's and inserting the data into Excel. Does anyone have familiarity with the following code:

searchFormula$ = "'((Form = 'ITAgentLogEntry') & ITLog_ConversationText = 'Sample Logging' )& '"

If so, can you provide assistance into the correct syntax for this, or any advice on its use? Thanks and any help would be greatly appreciated.
 
After much trial and error and a little help from a Lotus db programmer, below is the answer to my question. Note that '@Created' is a field in the Lotus Notes db. This format is useful when the LotusDBSQL OBDC driver is not an option.

varA = "Form = ""ITAgentLogEntry"" & @Created > [" & strInput1 & "] & @Created < [" & strInput2 & "]"


Also, the following Dim's were used:

Dim s As NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim doccol As NotesDocumentCollection

Dim nsession As NotesSession
Set nsession = CreateObject("Lotus.NotesSession")
Call nsession.Initialize
Set db = nsession.GetDatabase(serv, app) --(server path and name, and file name (.nsf))

Very Important Note: Notice I set 'nsession' to "Lotus.NotesSession', NOT 'Notes.NotesSession'.

I truly hope this syntax helps VBA programmers out there in the future. I spend days on this.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top