Data Environments
-
Under VB6 I have created an application and added a Data Environment to it for accessing an MSAccess database. Having created a Command in it to represent a view(query) in the database I have dragged and dropped it on to a blank form. When I run the app at this stage the form is correctly filled with the first record in the view. However, after making a call to the function of the same name as the view on the data environment on application startup to make sure the data is fully populated, I then added buttons to the form for navigation using MoveNext, etc (e.g. dataEnv.MyView - then dataEvnv.rsMyView.MoveNext). They don't work!!!!! The recordset is being navigated correctly (checked via inspection in the Locals window) and the cursor is being changed, but the controls on the form do not change. To add to the mystery, if I add a grid control to the form and bind it to the same view in the data environment, all of the records appear correctly in the grid. When the currently selected record is changed in the grid, the original controls update accordingly!!!!!!!!!!!!!!:wtf: Is there some subtle configuration that I have missed? Derek Lakin. I wish I was what I thought I was when I wished I was what I am. Salamander Software Ltd.
-
Under VB6 I have created an application and added a Data Environment to it for accessing an MSAccess database. Having created a Command in it to represent a view(query) in the database I have dragged and dropped it on to a blank form. When I run the app at this stage the form is correctly filled with the first record in the view. However, after making a call to the function of the same name as the view on the data environment on application startup to make sure the data is fully populated, I then added buttons to the form for navigation using MoveNext, etc (e.g. dataEnv.MyView - then dataEvnv.rsMyView.MoveNext). They don't work!!!!! The recordset is being navigated correctly (checked via inspection in the Locals window) and the cursor is being changed, but the controls on the form do not change. To add to the mystery, if I add a grid control to the form and bind it to the same view in the data environment, all of the records appear correctly in the grid. When the currently selected record is changed in the grid, the original controls update accordingly!!!!!!!!!!!!!!:wtf: Is there some subtle configuration that I have missed? Derek Lakin. I wish I was what I thought I was when I wished I was what I am. Salamander Software Ltd.
I don't know what I did wrong on the first place but it has automagically fixed itself now :confused: Derek Lakin. I wish I was what I thought I was when I wished I was what I am. Salamander Software Ltd.