I have been trying for a week to solve a problem in my code. The project I'm working on is simple time keeping program that tracks when a user logs in and logs out. The way I have it structured is that the user inputs his name in a text box and
a table is created in the data base, that part I have no trible with. My problem comes in when once the user changes forms and tries to log in on the login form the requested data is not updated to the database table.
In short I am attempting open an existing table using a textbox and inserting predefined date into the appropiate fields, eg. Date and time, with my code. As of now I have been testing using a simple form containing a textbox control and a button control,
there is no data access control on the form. All references to data control and access is written in the code.
Private Sub CmdOk_Click()
Dim Employees As ADODB.Connection
Dim rstmytable As Recordset
Dim Date_Id As Date
Set rstmytable = New ADODB.Recordset
Set Employees = New ADODB.Connection
Employees.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Employees.mdb"
rstmytable.Open (TxtName.Text), Employees, adOpenDynamic, adLockOptimistic, adCmdTableDirect