Hi all,
I am working on the form that list employee hours and i have add a save button
But what i want is when i press the save button the record is save to a new table so i can run the report from that table
Open the table and add the data. I am sure there is code in the FAQ that will show you how to do that. All the tipmasters have written the code in answer dozens of times.
Thanks Rolliee
I have a clear understand know of what im doing but i am getting a "TYPE MISMATCH" Error.
Below is the code behind the save button.
option Compare Database
Option Explicit
Private Sub Comsave_Click()
On Error GoTo Err_Comsave_Click
Dim xname As String
Dim xreghours As Integer
Dim xovertime1 As Integer
Dim xovertime2 As Integer
Dim xSick As Integer
Dim rs As ADODB.Recordset
'Dim rs As DAO.Recordset
Set rs = CurrentDb.Openrecordset("update_employee"
If IsNull(Me.Cbo21) Then
MsgBox "Pleaase select a employee name."
Exit Sub
End If
If IsNull(Me.RegHoure) Then
MsgBox "Please Enter the Regular hours"
Exit Sub
End If
You forgot to go to the design mode and press Tools/ References and place a check in the MS DAO 3.6 Library. You are using the DAO protocol and your computer is using the ADO. That check mark will pu things right.
Glad you understood it.
Rollie E
If this is helpful click the "Mark this post as helpful..."
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.