Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

master/detail dbgrid manipulation in VB6

Posted on 1998-10-14
3
Medium Priority
?
282 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 200 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

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 …
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

609 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