Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I need to createa new database called db.mdb that will contains a table call
tb with a few fields (field1, field2, field3). Then, I need to be able to add records in this table. Later in my program, I need to run an SQL query that will returns all records if field1 is = to "X" (then I need to list the resulting data) I have many topics about my questions but never managed to make it work. I have used the following example to create the database : strDB = "D:\db.mbd" ' Create new instance of Microsoft Access. Set appaccess = CreateObject("Access.Application") appaccess.NewCurrentDatabase strDB Set dbprinter = appaccess.CurrentDb Set tbprinter = dbprinter.CreateTableDef("tb") With tbprinter .Fields.Append .CreateField("filed1", DB_Text) .Fields.Append .CreateField("filed2", DB_Text) .Fields.Append .CreateField("filed3", DB_Text) End With db.TableDefs.Append tb db.Close The database and the table is created fine, but how do I creates records and then run my queries (the information to fill the querry is coming from a list from LDAP) ? is there another better method to create the database and the table (I'm under Excel2003, XP) |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Create new excel table with filtered records from another table | Excel Worksheet Functions | |||
Creating a databse from several Excel files | Excel Discussion (Misc queries) | |||
Making A Databse system on Excel? | Excel Discussion (Misc queries) | |||
How can I get all table names from MS Access databse | Excel Programming | |||
Create a Databse using VBA | Excel Programming |