Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Jim and Jamie. This is what I was looking for. I think I like the
method of writing my own SQL statements the best. I just wasn't sure how to pass them through. I appreciate the input. chris "Jamie Collins" wrote: "Jim Thomlinson" wrote ... Here is how I send a record to an Access Database. <<snipped If that's one approach then here's another, using SQL DML: Option Explicit 'Declare Module Level Constants Private Const m_cDBLocation As String = "\\C:\Forecast.mdb" Private Const m_cLogFile As String = "tblLogFile" Public Sub LogIn() Dim cnt As Object Set cnt = CreateObject("ADODB.Connection") ' Open connection to the database With cnt .ConnectionString = _ "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=" & m_cDBLocation .Open .Execute _ "INSERT INTO " & m_cLogFile & _ " ([User Name], [In As], Logged, [Time])" & _ " VALUES ('Me', 'Myself', 'In', NOW);" .Close End With End Sub Jamie. -- |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How can I import data from a mysql database into excel | Excel Discussion (Misc queries) | |||
Using Excel for MySQL database import | Excel Discussion (Misc queries) | |||
Database records from excel templates | Excel Discussion (Misc queries) | |||
Upload Excel data into online database | Excel Programming | |||
Adding New Records To Excel Database.. | Excel Programming |