Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using the same adodc connection for two separate forms
Message
Information générale
Forum:
Visual Basic
Catégorie:
Bases de données DAO/RDO/ODBC/ADO
Divers
Thread ID:
00614693
Message ID:
00615754
Vues:
17
>Good day Eric,
>I need your help again if you've got a minute.
>If I am using the two adodc connections along with two tables and forms that are linked with SQL how can I add records and save them in the second table? The adodc SQL that I use (per your suggestion) to link the tables from the first form is: SELECT * FROM FirstTable AS Old
>LEFT JOIN SecondTable AS New
>ON New.CustNum = Old.CustNum
>When the second form is loaded I use the code you suggested again:
> Set firstForm.adodc1.Recordset = secondForm.adodc1.Recordset
>How can I get the second table to add a new record? Since it is linked using the adodc SQL I am unable to use "Adodc1.Recordset.addnew" property to create a new record in the second table as the adodc on the second form is set to show the recordset of the first table.
>Thanks for your help in advance!!
>Max

Are you able to use AddNew on your first form? Have you changed the LockType to something else then ReadOnly? Try the AddNew without the JOIN (only on 1 table).
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform