Solved

master/detail dbgrid manipulation in VB6

Posted on 1998-10-14
3
272 Views
Last Modified: 2013-12-25
HI,
I Would like to know if it is possible to make a master/detail dbgrid.for ex by entering the client code in one col, the corresponding name from the master file is shown on the same row. I am using VB6.
0
Comment
Question by:jadidbin
  • 2
3 Comments
 
LVL 13

Expert Comment

by:Mirkwood
ID: 1487647
You mean showing a field from a relative table?
0
 
LVL 13

Accepted Solution

by:
Mirkwood earned 100 total points
ID: 1487648
I assume you do want to show a relative field.

The flexgrid sample in the vb samples. (samples\pguide\msflexgd)

The can make a snapshot and assign it to the recordsource property of the datacontrol like this.

    mysql$ = "SELECT "
    mysql = mysql & "Publishers.[Company Name], "
    mysql = mysql & "Authors.Author, "
    mysql = mysql & "Titles.Title "
    mysql = mysql & "FROM Authors INNER JOIN "
    mysql = mysql & "(Publishers INNER JOIN ([title author] INNER JOIN Titles ON [title author].ISBN = Titles.ISBN) ON Publishers.PubID = Titles.PubID) "
    mysql = mysql & "ON Authors.Au_ID = [title author].Au_ID "
   
    Data1.RecordSource = mysql

0
 

Author Comment

by:jadidbin
ID: 1487649
Thanks Mirkwood ,however i am using ado and and dbgrid and i am opening my recordsets in batch mode. the solution by Mirkwood works if i am working in immediate mode and i refresh manually. I would like it to happen in batch mode the same as in immediate mode
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now