Solved

master/detail dbgrid manipulation in VB6

Posted on 1998-10-14
3
280 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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…
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…

707 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