|
-
June 15th, 2002, 10:27 PM
#1
Desperately need VB help please...
Ok, I am using VB6 (patched up to SP5), and I am using a ADO Datacontroller and a MS Datagrid.
The ADO controler connection string is set to "PROVIDER=MSDataShape;Data PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=" & gDatabasePath & ";"
Where gDatabasePath is the database file path variable. (this works fine) The ADO Controller record source is set to "SHAPE {select KitNumber from IWSkitnums} AS ParentCMD APPEND ({select PartName,PartNumber,Qty,DateIssued,DateReceived,KitNumber from IWSkit } AS ChildCMD RELATE KitNumber TO KitNumber) AS ChildCMD"
The MS datagrid (PartsGrid) is then set using this the set command as follows: Set piIWS.PartsGrid.DataSource = piIWS.ADOcontroller.Recordset("ChildCMD").UnderlyingValue
Now all this works fine when I display the form containing these objects but the problem comes when I add data to the Child Database. When I add a new record to the child database and then refresh both the ADO controller and the datagrid the new record show on the fields controlled by the ADO controller but the new record does not show on the Datagrid. Here is where it gets weird, If I add another record the prior record appears in the datagrid. If I exit the form and come back the record appears. But, if I use code to close the window then use the same view code to make it visible again, the record is not thier until I manually exit the window and return.
What I need it to do is, when a record is added to the child database I need to be able to refresh the datagrid so that the new record appears in the datagrid without the user having to exit the window and return or without them having to enter another record. On the database end everything is working and all data appears as it should, it just seems to be the datagrid that is not working properly.
Any ideas?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|