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!

DataEnvironments and DataGrid/Combo Controls in VB6

Status
Not open for further replies.

afryer

Programmer
Mar 9, 2004
207
GB
Hi All,

I am developing an application using VB6 and as part of this I have created a new DataEnvironment, which connects to my backend database. I have created three commands within the connection, which are as follows:

cmd_profile - linked to a DataCombo box on the main form and displays data correctly
cmd_goals - Linked to a DataGrid on the main form and displays data correctly. Has a FK relationship with cmd_profile.
cmd_goalDetails - Linked to another DataGrid on the main form and displays data correctly. Has a FK relationship with cmd_goals

What I have been trying to do is to link the three commands, so that when the user selects an item from the DataCombo it automatically updates the two data grids. I can get this working fine if I link cmd_goals and cmd_goalDetails (done by setting the relation in cmd_goalDetails to point to the matching field in cmd_goals), but if I try this with the cmd_profile command it all stops working - even the ones that were working previously.

I have determined that if I attach cmd_profile to a dataGrid instead of a dataCombo then it all works fine, so it is obviously something to do with the combo box. I need to include the combo box in my application though....

Has anyone any ideas how I can fix this?

Thanks in advance


Andrew
 
Look at using the ADO Command object rather than a Dataenvironment or bound controls. You will have much better control over what's happening. A quick search on the forum will yield plenty of examples

___________________________________________________________
If you want the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
Steam Engine Prints
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top