Mystery of missing document and view Part2

Hi all,

this is my code:

Dim session as new notessession

dim db as notesdatabase

dim view as notesview

dim doc as notesdocument

set db = session.getdatabase(“Servername”, “stockinventory.nsf”,false)

set view = db.getview(“formsend”)

set doc = view.getfirstdocument

=====end of code================

Ok as of today, the problem still persis, “Object variable not set” which happen at the code “doc = view.getfirstdocument”

I tried replacing the code: “set db = session.getdatabase(“Servername”, “stockinventory.nsf”,false)” with

"set db = new Database(“servername”, “stockiventory.nsf”)

But the error is still there, i don’t wish to use error handling because it will not be solving the problem. I tried using other forms but the error will occurs at "Set view = db.getview(“formname”).

I have had checked the stockinventory.nsf many times and confirm that the views are there.

Any ideas?

Regards

hengshi

Subject: Mystery of missing document and view Part2

if the error is occurring here: Set doc = view.getfirstdocument then it sounds like your “view” is not geting set. Are you sure you have the view name correct?

Subject: Mystery of missing document and view Part2

in the debugger have you checked that stockinventory is opened?

are you sure the .nsf is in the root directory and not some other sub-directory, ie did you look at the design synopisis?

John