MS ACCESS

本身有個MS ACCESS PROGRAM, 個DB就放係SHARE FOLDER, APPLICATION就分開左係USER部機度.
問題係有時USER QUERY DATA 做拎到之前D RECORDS, 新RECORDS睇唔到要RESTART PROGRAM先睇到. 知唔知點解同有咩方法解決?

有諗過唔知係唔係CURRENTDB CACHE左定點. THANKS. 有冇IDEA, THANKS.

        Dim largestId As Integer
    Dim q As String
    Dim rs As Recordset2

        q = "SELECT Max([No])As LargestId FROM Entry WHERE YEAR = " & Year
  
    Set rs = CurrentDB.OpenRecordset(q)
                                                                                   
    If IsNull(rs.Fields("LargestId").Value) Then
        largestId = 0
    Else
        largestId = rs.Fields("LargestId").Value
    End If

Dim rs As Recordset2 改為  Dim rs As NEW Recordset2
甘就肯定每次個Recordset 系新既

TOP

相關文章