• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 644
  • Last Modified:

Resync Recordset

I'm trying to resync a recordset with this piece of code :

Private Sub cmdAccept_Click()
    With DtEnviromentFly.rsFly_table_Grouping
        .AddNew
        !User = cmbName.Text
        !Group = dtUsers.Recordset!Sector
        !Local = txtCompany.Text
        !Return = txtDate.Text
        !Extension = txtPhone.Text
        !Contact = txtContact.Text
        .Update
        .Resync
    End With
    Me.MSHFlexFly.Refresh
End Sub

. Two things are not working :

1st .: I can't access Fields above with a shaped recordset (runtime error).
       See Shape Command :  SHAPE {SELECT * FROM `Fly`}  AS Fly_table COMPUTE Fly_table BY 'Group'
       See Hierarchy Info : rsFly_table_Grouping
        Fly_table


2nd.: If I use another data control to Add a record, my rsFly_table_Grouping recordset doesn't resync (runtime error - insufficient base table information for updating or refreshing).


What do I need ?

1st.: Access fields on Fly table using the rsFly_table_Grouping recordset.

2nd.: Resync MSHFlexGrid - MSHFlexFly

0
mvianna
Asked:
mvianna
1 Solution
 
przemekCommented:
1) I don't think that you can add records with your "rsFly_table_Grouping " recordset.
2) Try to use Recordset.Requery metod ( not Resync ) to refresh your MSHFlexFly.
3) After requery you have to rebind your MSHFlexFly

Set MSHFlexFly.DataSource = nothing
MSHFlexFly.DataMamber = ""
MSHFlexFly.DataMamber = "Member"
Set MSHFlexFly.DataSource = DataEnv..

I hope it helps.

0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now