rajeshsarin
Registered User.
- Local time
- Tomorrow, 03:08
- Joined
- Sep 25, 2009
- Messages
- 50
Hi All,
I have three access 2007 databases that used to work just fine till we upgraded from Office 2007 to Office 2013.
Now on certain occasions when we hit some buttons (that have got some macro or VB procedure behind the buttons), the databases just closes itself.
I have checked again by running the database in 2007 and it works fine, but in Office 2013 it crashes.
Any help would be appreciated.
Regards - Raj
The Button is called Create Invoice and on click the event procedure runs that has the following code behind it
Private Sub Create_Invoices_Click()
Dim rs As DAO.Recordset
Dim InvoiceNo As Long
Dim prnt As [Form_Student Data]
Dim offr As Form_Offer
10 On Error GoTo Error_Handler
20 Set rs = CurrentDb.OpenRecordset("Invoice", dbOpenDynaset)
30 rs.AddNew
40 InvoiceNo = rs!InvoiceNo
50 rs!Inv_Date = Date
60 rs!Offer_ID = Me.[Offer ID]
70 rs!Inv_Due = Date + 15
80 rs!Inv_Staff = GetStaffName
90 rs.Update
100 DoCmd.OpenForm "Invoice", acNormal, , , , acDialog, InvoiceNo
110 On Error GoTo 0: Exit Sub
120 Error_Handler: Select Case fErrorHandler(err.Number, Erl, err.Description, "VBA Document Form_AcctsOffer", "Create_Invoices_Click"): Case vbRetry: Stop: Resume 0: Case vbIgnore: Resume Next: End Select
End Sub
I have three access 2007 databases that used to work just fine till we upgraded from Office 2007 to Office 2013.
Now on certain occasions when we hit some buttons (that have got some macro or VB procedure behind the buttons), the databases just closes itself.
I have checked again by running the database in 2007 and it works fine, but in Office 2013 it crashes.
Any help would be appreciated.
Regards - Raj
The Button is called Create Invoice and on click the event procedure runs that has the following code behind it
Private Sub Create_Invoices_Click()
Dim rs As DAO.Recordset
Dim InvoiceNo As Long
Dim prnt As [Form_Student Data]
Dim offr As Form_Offer
10 On Error GoTo Error_Handler
20 Set rs = CurrentDb.OpenRecordset("Invoice", dbOpenDynaset)
30 rs.AddNew
40 InvoiceNo = rs!InvoiceNo
50 rs!Inv_Date = Date
60 rs!Offer_ID = Me.[Offer ID]
70 rs!Inv_Due = Date + 15
80 rs!Inv_Staff = GetStaffName
90 rs.Update
100 DoCmd.OpenForm "Invoice", acNormal, , , , acDialog, InvoiceNo
110 On Error GoTo 0: Exit Sub
120 Error_Handler: Select Case fErrorHandler(err.Number, Erl, err.Description, "VBA Document Form_AcctsOffer", "Create_Invoices_Click"): Case vbRetry: Stop: Resume 0: Case vbIgnore: Resume Next: End Select
End Sub