วิธี Set Query เป็น Snapshot ด้วย Code
กระทู้เก่าบอร์ด อ.Yeadram

 1,288   1
URL.หัวข้อ / URL
วิธี Set Query เป็น Snapshot ด้วย Code

คุณสมบัติแบบสอบถาม>>ชนิดชุดระเบียน>>Snapshot
ต้องการ Set คุณสมบัติตัวนี้ด้วย Code ครับ เพราะมีหลาย Query
ทำ Menul ไม่ไหว

1 Reply in this Topic. Dispaly 1 pages and you are on page number 1

1 @R14792
ลองดูครับ

Public Sub SetQueryRecordSetType(pRecordSetType As Long)
'RecordSetType: 0=DynaSet, 1=Dynaset (Inconsistent Updates), 2=Snapshot

On Error GoTo ErrorHandle

Dim lngQueryCount As Long
Dim lngLoop As Long

    lngQueryCount = CurrentDb.QueryDefs.Count
    
    For lngLoop = 0 To lngQueryCount - 1
        CurrentDb.QueryDefs(lngLoop).Properties("RecordSetType") = pRecordSetType

    Next lngLoop

    Exit Sub
    
ErrorHandle:
    MsgBox "Cannot Set Property for Qeury [" & CurrentDb.QueryDefs(lngLoop).Name & "]", vbOKOnly
    Resume Next
End Sub
@ ประกาศใช้งานเว็บบอร์ดใหม่ => บอร์ดเรียนรู้ Access สำหรับคนไทย
แล้วจะใส่ลิ้งอ้างอิงมาที่โพสต์เก่านี้หรือไม่ก็ตามสะดวกครับ
Time: 0.2669s