Alright, to get around the 2GB limit on Access files, I've created a sharepoint list that will house 3 pts of data and 1 or more attachments. I've gotten this code to work with local tables, however when I changed the references to the sharepoint list I keep getting this error:
Run-time error '3175':
Date is out of range or is in an invalid format
on this line:
I don't even have a date field in the list (except for the required "Created" and "Modified" fields which I can't change)Code:rst.Update
here's the code, can anyone help me out?
Code:Private Sub cmdImport_Click() Dim dbs As Database Dim rst As Recordset2 Dim arst As Recordset2 Dim qrst As Recordset Dim fld As Field2 Dim aFile Set dbs = CurrentDb Set rst = dbs.OpenRecordset("Bid Evidence") If Me.txtSCode = "" Then rst.AddNew rst.Fields("VRM") = Me.VRMName rst.Fields("Comments") = Me.txtVRMComments rst.Fields("Title") = "Temp" rst.Update Set qrst = dbs.OpenRecordset("BidEvidenceSourceID") rst.Fields("Title") = qrst.Fields("Sourcecode") Me.txtSCode = rst.Fields("Sourcecode") Set fld = rst("Attachments") Set arst = fld.Value On Error GoTo Proc_Error For aFile = 0 To Me.Attachments.ListCount - 1 With arst .AddNew .Fields("FileData").LoadFromFile (Me.Attachments.ItemData(aFile)) .Update End With Next arst.Close rst.Update Set rst = Nothing Set dbs = Nothing Else MsgBox "Whoa There Nelly! You've already imported that one!" & vbCrLf & _ "Click the 'New' Button to import another file" End If Proc_Exit: Exit Sub Proc_Error: MsgBox "Error " & Err.Number & " in cmdImport.Click" & vbCrLf & Err.Description Resume Proc_Exit End Sub