|
Thread: VB
-
Aug 14th, 2000, 01:13 PM
#1
Thread Starter
Member
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
-
Aug 14th, 2000, 03:28 PM
#2
Monday Morning Lunatic
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|