open database

  • Thread starter Thread starter solo_razor
  • Start date Start date
S

solo_razor

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 are: dir_structure, lidnr, filesave

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

Regards,
Nie
 
Solo_razor said:
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 are: 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
 
Back
Top