Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Refresh ADO DataCombo control – (bound two Recordset)
Message
De
30/11/2000 11:46:04
 
 
À
Tous
Information générale
Forum:
Visual Basic
Catégorie:
Bases de données DAO/RDO/ODBC/ADO
Titre:
Refresh ADO DataCombo control – (bound two Recordset)
Divers
Thread ID:
00447422
Message ID:
00447422
Vues:
31
Refresh (metod Reguery) ADO DataCombo control – (bound two Recordset)

I have a classic form Products (frmProducts) with lookup ADO control Datacombo at field SupplierID, table Suppliers (adoPrimaryRS -> Products, adoSekRS -> Suppliers). This working OK.
Applied cmdRefreshDataCombo command button which added new item in dcbSupl (DataCombo). Click at command button call frmSuppliers in that is added new record (item). With Save or Cnacel command button close frmSuppliers and back in frmProducts.
Problems is because what adoSekRS.Requery not working in batch procedure (cmdAddSupl_Click) – not look new item. But, when is clicked simply at RefreshDataCombo_Click - refresh DataCombo is OK.

Code:

Dim WithEvents adoPrimaryRS As Recordset
Dim WithEvents adoSekRS As Recordset

Public Sub cmdAddSupl_Click()
Load frmSuppliers ' Add new record u LookUp form (recordset)
frmSuppliers.mbLookUp = True
frmSuppliers.Show vbModal
Set frmSuppliers = Nothing
RefreshDataCombo_Click ' Refresh Datacombo control with new item (record)
End Sub

Private Sub RefreshDataCombo_Click()
If Not (bkmAddBookmark = 0) Then ' Execute if NOT press cmdCancel in frmSuppliers
adoSekRS.Requery ‘ Problems- not working in: Sub cmdAddSupl_Click() !!!
dcbSupl.Refresh
End If
dcbSupl.SetFocus
End Sub


Please help me.
Respectfully,

Dušan Grujiæ
e-mail: ozisabac@ptt.yu
Répondre
Fil
Voir

Click here to load this message in the networking platform