Hello again,
I published another database to SharePoint (blah) and after altering my tables to make them "web compatible" everything seemed to have moved over and published just fine. However, when users (including myself) access the database, they are able to get into the form used to input time for certain projects. So, I'm thinking, "Great!" But, upon hitting the Submit button to enter their records, the error message "Run-Time Error 3027: Can't Update. Database or object is read-only" pops up. When I select Debug, it points me to the RunSQL statement within my VBA. Here is the entire code below w/ the error in red:
---------------------------------------------------------------------------
Private Sub cmdApply_Click()
Call setGlobals
If IsNull(gAlias) Then
gAlias = Environ("Username")
Call setAccess(gAlias)
End If
If IsNull(Me.cboBucket) Then
MsgBox "Please select a Category.", vbOKOnly, "Bucket Required"
Me.cboBucket.SetFocus
Me.cboBucket.Dropdown
Exit Sub
End If
If IsNull(Me.ProjectDate) Then
MsgBox "Please select a Date.", vbOKOnly, "Date Required"
Exit Sub
End If
If IsNull(Me.ProjectHours) Then
MsgBox "Please enter amount of hours (including 0).", vbOKOnly, "Enter Hours"
Exit Sub
End If
If IsNull(Me.ProjectMins) Then
MsgBox "Please enter the minutes spent on the project.", vbOKOnly, "Enter Minutes"
Exit Sub
End If
If (Me.ProjectHours = 0) And (Me.ProjectMins = 0) Then
MsgBox "Please enter time spent on the category.", vbOKOnly, "Enter Time"
Exit Sub
End If
Dim strSQL As String
Dim strMsg As String
Dim intCount As Integer
Dim selDate As Date
selDate = CDate(Month(Me.ProjectDate) & "/1/" & Year(Me.ProjectDate))
strSQL = "INSERT INTO tblTimeTracker (Alias, BucketID, ProjectDate, ProjectHours, ProjectMins)" & _
"VALUES ('" & gAlias & "', " & Me.cboBucket.Column(0) & ", #" & Me.ProjectDate.value & "#, " & Me.ProjectHours & ", " & Me.ProjectMins & " )"
strMsg = "Hours entered for " & Me.cboBucket.Column(1)
DoCmd.SetWarnings False
DoCmd.RunSQL strSQL
DoCmd.SetWarnings True
MsgBox strMsg, vbOKOnly, "Entry Successful"
Call setDates
Call crosstabRequery
End Sub
-----------------------------------------------------------------------------
I've searched the error code and there were suggestions like, copy my stuff into a new database and delete the old one, use compact and repair, etc... really nothing to do with the VBA. So, with that said, is there anything that I could maybe do with my VBA to save this or is it something with the database as a whole?
Any help would be much appreciated. Thanks.