This forum is closed to new posts and
responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:
Subject: Lotus Notes crashes when changing the view selection
Feedback Type: Problem
Product Area: Notes Client
Technical Area: Crash
Platform: Windows
Release: 8.5.3
Reproducible: Always
I made a button in a view that's used to open another view with a view selection formula according to a selection the user makes.
On some clients it lets Notes crash after selecting the year. On others it works fine.
Can someone see an error in this code? Or do I need to send the NSD file?
Thank you!
Sub Click(Source As Button)
Dim ws As New notesuiworkspace
Dim s As New NotesSession
Dim view As notesview
Dim startYear As Long
Dim choice As Variant
Dim years(8) As Variant
years(0) = "All Years"
years(1) = Cstr(Year(Today))
years(2) = Cstr(Year(Today)-1)
years(3) = Cstr(Year(Today)-2)
years(4) = Cstr(Year(Today)-3)
years(5) = Cstr(Year(Today)-4)
years(6) = Cstr(Year(Today)-5)
years(7) = Cstr(Year(Today)-6)
years(8) = Cstr(Year(Today)-7)
Set db = s.CurrentDatabase
Set view = db.getview("vwRegistrationForFullExport")
If Not view Is Nothing Then
choice = ws.Prompt(PROMPT_OKCANCELLIST, "Select a year", "Select a year from when the export starts", years(1), years)
If Isempty (choice) Then
Messagebox "User canceled", 48, "Canceled"
Exit Sub
End If
If choice = "All Years" Then
selection = {SELECT Form="Registration"}
Else
startYear = Clng(Cstr(Right(choice,2)) & "0000")
selection = {SELECT Form="Registration" & @TextToNumber(regID) >= } & startYear
End If
view.SelectionFormula = selection
Call view.refresh
Call ws.SetTargetFrame("fraMain")
Call ws.CurrentDatabase.OpenView("vwRegistrationForFullExport")
Else
Msgbox "View not found", 48, "view"
End If
End Sub
Feedback number WEBB96NACH created by ~George Pregerosterobu on 04/11/2013
Status: Open
Comments: