Can't update DAO recordset - Access crashes and closes

Copper Contributor

I have a database that has hardly changed in many years. Using it today (11/15), at least some DAO recordset operations cause it to crash and close with no message. It last worked just fine a month ago (10/13).  I have excerpted  from the code (which is either adding or recreating an invoice)

 

Dim db As DAO.Database 
Dim rstInv As DAO.Recordset

Dim sql as String

...

lngInvoiceNo - 1234  'for example

sql = "SELECT * FROM Invoices Where InvoiceID = " & lngInvoiceNo
Set rstInv = db.OpenRecordset(sql)
With rstInv
    If .RecordCount Then
      .Edit
   Else
     .AddNew
       rstInv!InvoiceID = lngInvoiceNo '''' dies here
       rstInv!InvDate = varInvDate
    End If

 

Access pauses at the marked line, then just closes entirely. I have taken steps to make sure its not the data, and similar things happening throughout the db. I found one windows office update in the last month and uninstalled it. It feels like my syntax is no longer valid though I have no errors in my references list and the VBA compiles. 

 

Any thoughts on this most welcome, needless tosay.

 

(Ugh, this is not my usual profile here...) 

3 Replies
what Fieldtype is InvoiceID? Autonumber?

Hi,

 

This is a bug that has been confirmed by Microsoft and will be fixed, but it only affects the Preview/Insider=beta channels (versions 2211/2212), not the Current channel (currently on version 2210). See also https://learn.microsoft.com/en-us/officeupdates/update-history-microsoft365-apps-by-date.

 

Personally, I don't run productive systems with the beta channels, but only with "productive" update channels like Current. This at least increases the chance that bugs will be fixed beforehand.

 

Servus
Karl
************
Access News
Access DevCon

Hi,

 

For all who are on Current Channel Preview = version 2011 with build 15831.xyz:

You can choose "Update Now" to get 15831.20122 immediately or wait for the update to happen in the next days.

 

A fix for the Beta Channel (version 2212) should follow soon.


Servus
Karl
************
Access News
Access DevCon