Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Shape object

Status
Not open for further replies.

ParyGoal

MIS
Jul 22, 2006
70
US
Hello Everyone.

This is what I am trying to accomplish. I am hoping some one could direct me to an example that uses the same concept.

I have tabbed form built in visual basic form. Each tab contais information regarding a child table (Detail Info). I have a total of 8 tabbs. Thus 8 child tables. In access it was easy representing the data model through subforms, where is subform record is linkes to the parent table through a key.
I heard you could use Shape object to accomplish the same thing in Visual Basic, but the examples I found on microsoft site deal with one parent table and one child table.
Can anyone help me with this please?

I want the user to be able to select a record from a combo box, which represents the parent table, and based on the selection my tabbbed form opens and populate the tabs with the corresponding information. And ultimately edit the child records and that form with add, edit and delete buttons.

Thank you

ParyGoal
 
You can have as many child tables locked to a parent as you like if you use a SQL statement in the child recordsource to only show records in the child table grid that belong to the parent and that child. You need a parent ID and a child ID.
You can get funny things happening in VB6 where if you make a change to a child table it doesn't always get saved in the underlying table automatically like access.
I have made the child grid read only and have a set of separate text entry boxes and a confirm/save button that does a dynaset on the table and refreshes the grid to make sure.
 
>You can get funny things happening in VB6 where if you make a change to a child table it doesn't always get saved in the underlying table automatically like access.

That is because of a transactional flush cache delay, which is suppose to improve performance on the client side, for a single connection.

If you use a keyset/dynaset (ADO/DAO), or if you are using an ADO Static cursor with a Batch Update or a UPDATE sql statement on the Connection's Execute method, then there should not be any problems at all - If the same active connection is used for eveything.
If you use different connections, you will need to refresh the Cache using a Refresh Cache\Flush Cache (JRO/DAO) option, or wrap the update in a transaction with a flush option when updating.
 
Thank you both SBerthold and TedSmith for your responses.
Unfortunately I can't see a better a way to handle the user interface requirements. Maybe I should use a flexgrid instead?
I am trying to add records to a DataGrid from two different combo boxes. I am able to do with one combo box, but not two. There is a parent child relationship defined the database. The data source for the combo boxes is based on two different tables.
Any advise?
Thank you

ParyGoal
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top