Hi,
Ive never been stuck this much.
i dont know what else to do.
The problem is, i use the DoCmd.GoToRecord , , acNewRec to add a new record. It used to work fine, but to day, i keep getting the error 2105, Cannot go to secified record.
i dont know why, and i dont know what else to do.
this is my code atm.
Ive never been stuck this much.
i dont know what else to do.
The problem is, i use the DoCmd.GoToRecord , , acNewRec to add a new record. It used to work fine, but to day, i keep getting the error 2105, Cannot go to secified record.
i dont know why, and i dont know what else to do.
this is my code atm.
Code:
Private Sub Knop26_Click()
Dim strFull, strLastNumber, strLastRecord As String
Dim strFirstNumber As String
Dim strRest As String
Dim x As Integer
Dim cn As ADODB.Connection
Set cn = CurrentProject.Connection
Dim rs As Recordset
Set rs = Me.MinutesListSF.Form.RecordsetClone
Forms!MinutesMFnew!MinutesSF.SetFocus
strFull = (Forms!MinutesMFnew!MinutesSF!MinutesID)
If Me.MinutesListSF.Form.RecordsetClone.RecordCount > 0 Then
rs.MoveLast
strLastRecord = rs!MinutesID
strLastRecord = GetFirstNumber(strLastRecord)
DoCmd.GoToRecord , , acNewRec
Else
DoCmd.GoToRecord , , acNewRec
Forms!MinutesMFnew!MinutesSF!MinutesID = " 1"
End If
Forms!MinutesMFnew!MinutesSF!MinutesID = " " & strLastRecord
Forms!MinutesMFnew!MinutesSF!MinutesTitle = ""
Forms!MinutesMFnew!MinutesSF!AreaCode = ""
Forms!MinutesMFnew!MinutesSF!OldMinuteID = ""
' Forms!MinutesMFnew!MinutesSF!EmployeeCode_followup = ""
Forms!MinutesMFnew!MinutesSF!SubjectCode = ""
Forms!MinutesMFnew!MinutesSF!Combo15 = Forms!MinutesMFnew!ComboMeetingNav
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Me.MinutesListSF.Requery
sort
Me.MinutesListSF.Requery
rs.Close
Set rs = Nothing