Solved

How to create parent to child tabbed windows

Posted on 2001-06-23
9
225 Views
Last Modified: 2010-05-02
i need to create a vb program that shows address book entries in the main view (window A). i need two more windows one for documents (window b)related to the address book entry that is selected and one for notes (window c)related to the address book entry that is selected as the user selects a new address book entry i  want the data in the documents and notes to change match. I need each window to be linked to a corrosponding table using ADO.

I have not started this and would appreciate code examples links and helpfull tips, i have more points if needed.

layout

--------------------------
|                         |
|  window a               |
|                         |
--------------------------
|          |              |
| window b | window c     |
--------------------------


Thanks in Advance

0
Comment
Question by:krisjob
  • 4
  • 2
  • 2
  • +1
9 Comments
 
LVL 4

Expert Comment

by:wileecoy
ID: 6221798
Question:

Are all of these windows on one form? or are they different forms?

Also - is this a single document interface, or multiple document interface?

Do you have the databases set-up?
0
 
LVL 1

Expert Comment

by:khampton
ID: 6222405
The link you refer to can be acheived in several ways.  I prefer to use events and code.

If an item is selected in view A, you will know because an event will be triggered (MouseUp for instance).

In this event, add the code to call a routine that will populate a recordset via a "Select * from MyTable Where ForeignKey = SelectedKey" (SelectedKey is the value of the item selected in view A and ForeignKey is the "linking or relational field(s)" for the data to displayed on the views).

Then put the fields into labels or textboxes residing on the view b and view c as desired.

0
 

Author Comment

by:krisjob
ID: 6222483
I have not got a database set up yet and would use a MDI interface.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 4

Expert Comment

by:wileecoy
ID: 6222760
So your WindowA, WindowB, WindowC are all seperate forms within the same MDI application?  Yes?

I would agree with khampton in terms of using the events to trigger code that will update the data in the other two forms.

I can give you an example if this is what you are looking for, but it would require a lot of assumptions on my part.
0
 

Author Comment

by:krisjob
ID: 6222920
code would be nice, as i say i need an example. from this example i could laern how it works.

thanks

0
 
LVL 8

Expert Comment

by:glass_cookie
ID: 6223581
Hi!

Here's a link for you:

Download...
http://www.vb-helper.com/Howto/mdichild.zip
Description: Arrange MDI child forms (3K)


Download..
http://www.vb-helper.com/Howto/ado6.zip
Description: Use GetRows to load data from an ADO Recordset into an array (7K)

Download...
http://www.vb-helper.com/Howto/ado6.zip
Description: Display selected fields from a database using ADO and a grid (8K)

This may be applicable (just in case)

Download...
http://www.vb-helper.com/Howto/dbtocbo.zip
Description: Load a ComboBox and ListBox from a database (8K)


That's it!

glass cookie : )
0
 
LVL 8

Accepted Solution

by:
glass_cookie earned 300 total points
ID: 6223591
One more : )

Download...
http://www.planetsourcecode.com/upload/ftp/CODE_UPLOAD1811.zip

Description: This is an example of a DAO DATABASE CONNECTION PROGRAM Este es un ejemplo de un PROGRAMA DE CONECTIVIDAD A UN BASE DE DATOS POR DAO. This program contains an english part, for those that speak english. Este programa contiene un parte en espa?ol, para aquellos que hablan espa?ol.

That's it!

glass cookie : )
0
 
LVL 8

Expert Comment

by:glass_cookie
ID: 6223593
The above title: Address Book - Directorio Telefonico
0
 
LVL 8

Expert Comment

by:glass_cookie
ID: 6223601
Download...
http://www.planetsourcecode.com/upload/ftp/CODE_UPLOAD5594582000.zip

Description: TOTAL DATABASE APP. add/delete/update/edit/SEARCH everything you expect from a good database address book/donation records/ and REPORT of donation a user has made over a certain time

Download...
http://www.planetsourcecode.com/upload/ftp/CODE_UPLOAD228612141999.zip

Description: Heres the update to my Address Book Example that pulls it information from an Access Database. I finally added the search and delete functions because I got tired of getting email from people asking me to write the update. :) Sorry it took so long but I've been busy opening up my office... Email any questions you have or comments to plexxonic@softhome.net

That's it!

glass cookie : )
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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

Suggested Solutions

Title # Comments Views Activity
How does CurrentUser work? 10 42
vb6 connector to mongodb 2 144
TT Auto Dashboard 13 101
VBA - If Bookmark = "XXBOOKMARKXX" then 15 51
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
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…
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…

730 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