Skip to main content
This forum is closed to new posts and responses. New discussions are now taking place in the IBM Developer Answers forum.
 
developerWorks
AIX and UNIX
Information Mgmt
Lotus
New to Lotus
Products
How to buy
Downloads
Live demos
Technical library
Training
Support
Forums & community
Events
Rational
Tivoli
WebSphere
Java™ technology
Linux
Open source
SOA and Web services
Web development
XML
My developerWorks
About dW
Submit content
Feedback



developerWorks  >  Lotus  >  Forums & community  >  Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum

developerWorks

  

PreviousPrevious NextNext


Mark XY Brown 19.Aug.09 01:21 PM a Web browser
Applications Development 6.0.3 Windows XP


I've set up a database for users to make service requests - it's something of a work in progress.

The current changes involve calendar views. I've set it up so that existing requests can be dragged and dropped into new dates and, subject to some checking, the document gets the new request date added to it. I'd like to enable the users to double-click on a day within the calendar and have a new request appear, with the selected date in the relevant field. The code that I have so far is:

Sub Regiondoubleclick(Source As Notesuiview)
'2009-Aug-18
'Create a new request if it's not in the past.

Dim datNew As NotesDateTime
Dim booCheck As Boolean
Dim nitNew As NotesItem

Set uiDb = ws.CurrentDatabase
Set db = uiDb.Database
Set doc = db.CreateDocument
doc.Form = "LoadRequests"
Set uiDoc = ws.EditDocument(True, doc, False, ,True, False)

Set datNew = New NotesDateTime(Source.CalendarDateTime)

Set nitNew = doc.ReplaceItemValue("LRReqDate", datNew.DateOnly)

If Not uiDoc.EditMode Then uiDoc.EditMode = True
uiDoc.Refresh

booCheck = ViewValidate(datNew, doc, 1)

If Not booCheck Then

doc.SaveOptions = 0
Set doc = Nothing
Call uiDoc.Close(True)
Set uiDoc = Nothing

End If

End Sub

(ViewValidate is a function that compares dates and times in the document with values from other documents and either allows or rejects the change.)

When I step through the code, it falls over at "If Not uiDoc.EditMode..." If I comment that line out and run it, it falls over at the next line. I've seen posts in this forum about a known issue using uiDoc.EditMode to set a UIDoc to Read mode, but I haven't seen anything about what I'm trying to do - set it to Edit mode. Does anyone have any ideas?

Also, does anyone know why, when the argument in the EditDocument method clearly states that the UIDoc should be in Edit mode, the EditMode property gets set to False?






UIDoc problems when creating new do... (Mark XY Brown 19.Aug.09)
. . RE: UIDoc problems when creating ne... (Dan P King 20.Aug.09)
. . . . RE: UIDoc problems when creating ne... (Mark XY Brown 20.Aug.09)
. . . . . . RE: UIDoc problems when creating ne... (Dan P King 20.Aug.09)
. . . . . . . . RE: UIDoc problems when creating ne... (Mark XY Brown 20.Aug.09)
. . . . . . . . . . RE: UIDoc problems when creating ne... (Dan P King 20.Aug.09)
. . . . . . . . . . . . RE: UIDoc problems when creating ne... (Mark XY Brown 20.Aug.09)





  Document options
Print this pagePrint this page

 Search this forum

  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Author
Category
Platform
Release
Advanced search

 RSS feedsRSS
All forum posts RSS
All main topics RSS
More Lotus RSS feeds

Resources

 Resources
Forum use and etiquette
Native Notes Access
Web site Feedback

Lotus Support

 Lotus Support
IBM Support Portal - Lotus software
Lotus Support documents
Lotus support by product
Lotus support downloads
Lotus support RSS feeds

Wikis

 Wikis
IBM Composite Applications
IBM Mashup Center
IBM Connections
IBM Connections Cloud Developers
IBM Docs
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud for Social Business
IBM Web Experience Factory
Lotus Domino
Lotus Domino Designer
Lotus Expeditor
Lotus Foundations
Lotus iNotes
Lotus Instructor Community Courseware
Lotus Notes
Lotus Notes & Domino Application Development
Lotus Notes Traveler
Lotus Protector
Lotus Quickr
Lotus Symphony
IBM Web Content Manager
WebSphere Portal

Lotus Forums


 Lotus Forums
Notes/Domino 9.0
Notes/Domino 8.5 + Traveler
Notes/Domino XPages development forum
Notes/Domino 8
Notes/Domino 6 and 7
IBM Connections
IBM Mobile Connect
IBM Sametime
IBM SmartCloud Notes
Lotus Enterprise Integration
Lotus Protector
Lotus Quickr
Lotus SmartSuite