I seem to be getting nowhere fast though. When I click the button nothing happens anymore, the page is doing something as its refreshing a field which is bound from the form to the table. But all the other fields "should" be transferred using this code:
Code:
Private Sub AddToSheet_Click()
Dim sActivity As String
Dim sDepartment As String
Dim sProject As String
Dim sHours As Double
Dim sDescrip As String
Dim Msql As String
sActivity = Me.Activity
sDepartment = Me.Department
sProject = Me.Project
sHours = Me.Hour
sDescript = Me.Description
Mysql = "INSERT INTO TimesheetTable (Activity, Department, Project, Hours, Description) Values ('" & sActivity & "', '" & sDepartment & "', '" & sProject & "', " & sHours & ", '" & sDescrip & "')"
DoCmd.SetWarnings False
DoCmd.RunSQL Mysql
DoCmd.SetWarnings True
Me!TimesheetTableSubform.Form.Requery
End Sub