ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   open database (https://www.excelbanter.com/excel-programming/285260-open-database.html)

solo_razor[_43_]

open database
 
hello,

Maybe this is not the best forum to post, but i am desperit. I hav
defined some variables and i want to put those in a table.
The database is called : proto
The table is called: structure
items a dir_structure, lidnr, filesave

I am using msaccess. Does anybody has some code to put this into
record of this table

Regards,
Nie

--
Message posted from http://www.ExcelForum.com


Bill Manville

open database
 
Solo_razor wrote:
I have
defined some variables and i want to put those in a table.
The database is called : proto
The table is called: structure
items a dir_structure, lidnr, filesave

I am using msaccess. Does anybody has some code to put this into a
record of this table


Tools / Reference / Microsoft DAO Library 3.6 (or as appropriate)

Sub AddRecord()
Dim DB As Database
Dim RS As RecordSet
Set DB = OpenDatabase("C:\MyDir\Proto.mdb")
Set RS = DB.OpenRecordset("Structure", dbOpenDynaset)
RS.AddNew
RS("Dir_Structure") = "A"
RS("lidnr") = 2
RS("filesave") = "C"
RS.Update
RS.Close
DB.Close
End Sub

Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - reply in newsgroup



All times are GMT +1. The time now is 04:16 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com