Forum: สอบถามปัญหา Notes ทางด้านพัฒนาโปรแกรม (Note Client) |
Tags1: IBM Lotus Domino/Notes| Created on Feb 26, 2012, 8:46 PM by kosol/9Notes|Topic Responses: 1 |
&action=openDocument&documentId=16AA |
ผมต้องการให้โปรแกรมมันสร้าง collection โดยเก็บมาเฉพาะวันที่ตั้งแต่ช่วงที่เราระบุเป็นต้นไป
แต่ทำยังไง collection.count ก็ยังเป็น 0 อยู่ดี
อยากให้ช่วยดูให้หน่อยครับว่าทำอะไรผิดไป
Dim ws As New NotesUIWorkspace
Dim session As New Notessession
Dim db As NotesDatabase
Dim collection As NotesDocumentCollection
Set db = session.CurrentDatabase
Set uidoc = ws.CurrentDocument
Set doc_current = uidoc.Document
searchFormula$ = {(Form = "frm_appointment") & (Service_Date >= } & doc_current.datefrom(0) & {)}
Set collection=db.Search(searchFormula$,Nothing,0)
Msgbox collection.Count
หมายเหตุ
1. field ที่เกี่ยวข้องมีเพียงอันเดียวครับ คือ doc_current.datefrom(0)
2. Service_Date เป็นชื่อ field ใน frm_appointment |
|