Solved

master/detail dbgrid manipulation in VB6

Posted on 1998-10-14
3
278 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

828 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