-
I have a question ok i have a database i want to be created at run time how do i go about doing that in the program its a personal inventory so it has to be saved evertime things are added and updated so if any of you could help me that would be great :)
-
-
i use the data control in the other databases i dont know much about the differant types. But i do know what i want it to do. the database that will be used could be viewed in its own form with a datacontrol hopefully. I hope im not confusing you but im not the best at vb
-
You're probably using DAO. Here is an example that creates a database, a table, and two fields.
Code:
Dim db As Database
Dim tbl As TableDef
'create the database
Set db = DBEngine.CreateDatabase("C:\test.mdb", dbLangGeneral)
'create table object
Set tbl = New TableDef
tbl.Name = "New Table"
'add fields to table
tbl.Fields.Append tbl.CreateField("TestField", dbText, 100)
tbl.Fields.Append tbl.CreateField("AnotherField", dbText, 50)
'add the table to the database
db.TableDefs.Append tbl
'close database
db.Close
Set db = Nothing
HTH
Tom
-
ok thats kinda how i did it but i have one more question.
I would like to copy one row from one database and control and form to another database and control and form any idea on how i can do this?
thanks