Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
search this newsgroup - I posted some code for a similar query withing the
past month I'm sure in the IDE ( the development environment) set a reference (Tools.referemces) to Microsoft Active Data Objects 2.6 Library Sub WriteDataToAccess() Dim MyFile As String Dim con As New ADODB.Connection Dim SQL As String Dim com As ADODB.Command MyFile = "E:\Excel\Excel_Demos\Risk.mdb" SQL = "insert into BondTable ( [Currency] ,[Security] ) values ('USD','Trsry 4 2018')" con.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & MyFile With New Command .ActiveConnection = con .CommandType = adCmdText .CommandText = SQL .Execute Debug.Print .Properties.Count End With con.close Set con = Nothing End Sub you need to chaneg the obvious - database name etc, and amend the SQL statement of course "prabhu s" wrote: Hi.. This is prabu. i have a question. i want to insert excel record into access(not import or export). i have text box in excel sheet Name, age, address & i have one button. once i hit the button. all record insert to access. can you help me for this. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Insert data in access by excel. | Excel Programming | |||
Insert a subdatasheet in Excel, like Access | Excel Discussion (Misc queries) | |||
Insert Whole Row in Excel when one column is updated from Access. | Excel Programming | |||
Is it possible to insert an Access Table object into Excel? | Excel Programming | |||
Is it possible to insert an Access Table object into Excel? | Excel Programming |