View when opening DB

Since a default view is only “default” the very first time a user opens a database, what dictates which view will appear upon opening a database AFTER the very first time? (This is assuming “Restore as last viewed by user” is not checked.)

I’m getting some very strange behavior where the running of a private agent seems to be changing the view a user is used to seeing when opening the DB. Here’s the agent’s code (I can’t see any reason why this would impact what view appears):

Dim s As New NotesSession

Dim db As NotesDatabase

Dim dealDoc As NotesDocument

Dim matchingDeals As NotesDocumentCollection

Set db = s.CurrentDatabase

Dim deal As String

Dim searchFormula As String



doAnother = True



While doAnother

	deal = Inputbox("Enter Deal Nbr")

	

	If deal <> "" Then

	'find the deal

		searchFormula = {(form = "DEALNew" | form = "DEALAmend" | form = "DEALInherit") & !@IsResponseDoc & 

(Status = “Pipeline” | Status = “Request” | Status = “Contract” | Status = “Proof” | Status = “Mailed”) &

(DealNbr = “} + deal + {”)}

		Set matchingDeals = db.Search(searchFormula, Nothing, 0)

		

	'Check that only one doc has been retrieved:

		makeChange = True

		If matchingDeals.Count > 1 Then

			Messagebox "Check for duplicates of deal # " & deal & ".  No change made."

			makeChange = False

		Elseif matchingDeals.Count = 0 Then

			Messagebox "No match found for deal # " & deal

			makeChange = False

		End If

		If makeChange Then

			Set dealDoc = matchingDeals.GetFirstDocument

			daysInProg% = Cint(Inputbox("Enter Days In Prog"))

			If dealDoc.Status(0) = "Pipeline" And Isdate(dealDoc.PipelineDate(0)) Then

				dealDoc.PipelineDate = Date() - daysInProg%

				Call dealDoc.Save(True,True)

			Elseif  Isdate(dealDoc.NegEndDate(0)) Then

				dealDoc.NegEndDate = Date() - daysInProg%

				Call dealDoc.Save(True,True)

			End If

		End If

	End If

	

	'see if user wants to change another:

	boxType& = MB_YESNO + MB_ICONQUESTION

	answer% = Messagebox("Do you want to change another deal?", boxType&, _ 

	"Continue?")

	If answer% = IDNO Then

		doAnother = False

	End If

Wend

Subject: view when opening DB

Create a frameset as a default frameset. Have the database open the frameset when opening the database, then in the frameset, select the view you want to be there.

  • Matt

Subject: RE: view when opening DB

Actually, that IS how I have it set up. It launches on a frameset, and I have the view frame set to open on a specific view.