How can i create a table with my desired fields in a existing access db using vb? What should be da code? Example will b appreciated.

Dim wrkJet As Workspace
    Dim db As Database
    Dim rs As Recordset
    Set wrkJet = CreateWorkspace("", "Admin", "", dbUseJet)
    Set rs = db.OpenRecordset("CREATE TABLE tbl (fld1 varchar(30), fld2 int)")
    rs.Addnew
    rs.Fields("fld1") = "Some text"
    rs.Fields("fld2") = 1234
    rs.Update
    rs.Close
    db.Close
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.