?
Solved

Writing from Access to form in Lotus Notes

Posted on 2002-05-08
12
Medium Priority
?
295 Views
Last Modified: 2013-12-18
Hello experts.  

I am trying to write from a table in Access 2000 to a form in a shared mailbox in Lotus Notes version R5.  

I would like it to look at the first record on a table, write to certain fields on a form in Access, then look to the next record to see if there is a match, if not, then the form will be sent out via Lotus Notes, if there is a match, it will continue to populate the appropriate fields.  This will continue to the end of the recordset.

Thanks for the help!!!
0
Comment
Question by:pucktarget2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
  • 4
12 Comments
 
LVL 10

Expert Comment

by:zvonko
ID: 6997084
Start looking at this and then redefine your question:
http://www-10.lotus.com/ldd/sandbox.nsf/ecc552f1ab6e46e4852568a90055c4cd/6704c9ebb583859f8525694d004e51b0?OpenDocument

Perhaps is your question biger part better located here:
http://www.experts-exchange.com/msaccess/

Good luck,
zvonko

0
 
LVL 9

Accepted Solution

by:
Arunkumar earned 300 total points
ID: 6997085
Hi !

I have a sample script try this... create an agent with the following code....Make modifications to all the commented values.


Option Public
Uselsx "*lsxodbc"


Sub Initialize
     Dim ss As New NotesSession
     Dim db As NotesDatabase    
     Dim view As NotesView
     
     Dim prodoc As NotesDocument
     Dim newdoc As NotesDocument
     Dim olddoc As NotesDocument
     
     Dim con As New ODBCConnection
     Dim qry As New ODBCQuery
     Dim result As New ODBCResultSet
     
     Set db = ss.CurrentDatabase
     
     dsn$ = "DSN NAME"
     usrname$ = "USERNAME"
     passwrd$ = "PASSWORD"
     
     Print "Initializing Db connection.  Please wait....."
     
     If Not con.ConnectTo ( dsn$ , usrname$ , passwrd$) Then
          Print "Not connected .....Exiting........!"
          Msgbox "Not connected " , , "Exiting"
          Print
          Exit Sub
     Else
         
          Print "Connection to Db established successfully !"          
         
          Set qry.Connection = con
          Set result.Query = qry          
         
          'Change the query to yours accordingly from Access
          qry.SQL = "SELECT DISTINCT C_AREA FROM MPMASTR_TBL"
         
         
          result.Execute
         
          If result.IsResultSetAvailable Then
               i = 1              
               Do                                        
                   
                    result.NextRow
                    area = Trim( result.GetValue("C_AREA") ) ' Column Name to be changed.
                    ' Get as many values and put in variables as needed
                   
                    Set view = db.GetView("(lkupAreas)")   ' A view to sort the notes entries by key (Column Value)
                    Set olddoc = view.GetDocumentByKey(area)
                   
                    If olddoc Is Nothing Then                        
                         Print "Creating New entry in Notes for #" & i                        
                         Set newdoc = db.CreateDocument
                         newdoc.Form = "Areas" ' Your Form name
                         newdoc.Area = area ' Your Field goes here
                         'Add as many field values from the variables gotten above from columns
                         
                         Call newdoc.Save(True, False)
                         Delete newdoc                        
                    Else
                         Print "Updating existing entry in Notes for #" & i
                         olddoc.Area = area
                         Call olddoc.Save(True,False)
                         Delete olddoc
                    End If                                      
                   
                    i = i + 1                      
                   
               Loop Until result.IsEndOfData
               
               Print
               
               result.Close(DB_CLOSE)
               
          End If
         
          Call con.Disconnect
         
     End If              
End sub
==============

Hope this is of some help to start your coding.

Good Luck!
Arun.
0
 
LVL 9

Expert Comment

by:Arunkumar
ID: 6997086
Oh Zvo!

just in front.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 10

Expert Comment

by:zvonko
ID: 6997107
I do not see you online in Groove.
Why do you not start it when you are dialed in?



0
 

Author Comment

by:pucktarget2
ID: 6997278
Thanks for the help.  I should be able to test some of this tomorrow when my Oracle connection is fixed (new PC problem, unrelated to question).

0
 
LVL 9

Expert Comment

by:Arunkumar
ID: 6997342
I am always connected from home.  I just dont start it Sorry.  Will do it more often okay bud ?
0
 
LVL 10

Expert Comment

by:zvonko
ID: 6997385
OK, but now I go to bed and tomorrow I am for four days away to another town :-)

But afterwards...

Cheerio Arun :-)

By the way: thank you for making me manager in YOUR shared space, Bro :-)
0
 

Author Comment

by:pucktarget2
ID: 7001153
I should be able to try some of this code today.
0
 

Author Comment

by:pucktarget2
ID: 7001162
Hey Arun, I was looking at your code and had a question.  I forgot to mention that this process will be automated (the program will open on a timer in the a.m.).  Will this have an affect on the code or can it still be used as is?
0
 
LVL 10

Expert Comment

by:zvonko
ID: 7014739
OK pucktarget,

give me some more details about your Access data source name table and field names so I can build the LotusScript agent more readable for you.

So long,
zvonko

0
 
LVL 9

Expert Comment

by:Arunkumar
ID: 7015259
Nope !

It should not have any effect as long as your server has the dsn setup with the odbc drivers !

Good Luck!
Arun.
0
 

Author Comment

by:pucktarget2
ID: 7021483
Thanks for the help.  I am not really a Notes developer so the help is greatly appreciated.  Mainly I am learning on the fly here.  

Zvonko,

I have a question located on the Access forum for the same topic, I would like you to take those points.  The link is below. There were no responses from anyone in the Access forum anyway.  Thanks for the offer to build but I would like to give it a go and if I have a problem I will post a question rather than asking you to build one for me.  Gotta learn somehow.  THANKS!!!

http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=msaccess&qid=20298462

0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question