Hi all,
for the whole day, i have been tryin to locate an error which i reali have no idea abt.
The database, lets call it “stockinventory.nsf” have a view call “Formsend”. When i viewed the db in designer format, i found out that there is another view call “(Formsend)”
Ok the situation here is that in “Formsend”, i visually saw a document inside that view, but when i try to call it using the following, it juz keep pushing an error of “Object Variable not set”
code:
dim session as 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
======all is fine till this statement===========
Print doc.RequiredMgrField(0)
=========end===============
Now all of you might ask me to take .getView(“Formsend”) but the amazing part is when i tried using that, the error will be at view.getfirstdocument.
So i wonder if the view is empty so i input this code
if doc is nothing then
print “wahahaha”
end if
surprisingly the word wahahaha appear!!! And i am pretty sure the document exist in the view coz i actually saw it in the view!!! And in designer, i saw that document appear in the programmer pane for view (Formsend). Super weird rite?
I further tested using other databases beside stockinventory.nsf, all turn out fine. Haha is it a ghost database?
Can anyone solve the mystery of missing document? Plus, the error is fixed as “Object Variable not set” no other error msg come out.
Thanx
Regards,
hengshi