Solved

How to create parent to child tabbed windows

Posted on 2001-06-23
9
222 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
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
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.
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…

776 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