Results 1 to 2 of 2

Thread: VB

  1. #1

    Thread Starter
    Member
    Join Date
    Aug 2000
    Location
    Minneapolis
    Posts
    42
    Hi,
    My question is:
    *******************
    I would like to create a "updatable" master/detail vb form which would display the records from the master and detail tables in the Access database.
    Tha master table is "Dept" and detail table is "Emp".
    Iam trying with Flex grid control in VB, but it is only read only.
    It is not allowing me to update the master/detail records.
    Can you please tell me how to accomplish this.

    Please reply as soon as possible.
    *************
    Thanks
    Srini

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    The best way is probably to use the Database and Recordset objects (part of DAO). There's full documentation in VB and Access, but basically:
    Code:
    Dim x As Database
    Dim y As Recordset
    
    Set x = OpenDatabase("c:\mydb\mydb.mdb")
    Set y = x.TableDefs("Tab").OpenRecordset
    
    y.AddNew
    y!Field1 = "Field1 data"
    y.Update
    y.Close
    x.Close
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width