Help with DAO AddNew / Edit And Update in VB 4 
Author Message
 Help with DAO AddNew / Edit And Update in VB 4

I am new to VB 4 and need and would appreciate any help anyone could give
me with the following problem in Visual Basic 4.

The following code fragment appears to work in VB 3.

        Assume I have opened the following DAOs :-

                MyDB : A Database Object
                MyDyna : A Dynaset opened from MyDB

        In my code :-

                MyDyna.Fields("Field1") = "Hello"

        Or :-

                MyDyna.Fields("Field1") = "Something"

        These appear to work OK.

        In VB 4 I try the following :-

        Assume MyRecordset is a recordset opened from MyDB

                With MyRecordset
                        .Fields("Field1") = "Hello"
                End With


                With MyRecordset
                        .Fields("Field1") = "Something"
                End With

        These will result in a run time error :-

                Argument not optional

        on the Update line.

        I have even tried this with the examples from the VB online help with the
same result. I have set references to the Microsoft DAO 3.0 Library. I have
also tried Microsoft DAO 2.5 Library as well as the 2.5/3.0 Compatibility
Library with no luck. I have run out of ideas and have not enough
back-ground in VB 4 to figure why. Any help in this would be appreciated.

Many thanks.

Thu, 24 Jun 1999 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. VB 4.0, Access 95, DAO: Recordset.Edit / Update problem

2. VB 4.0, Access 7, DAO: Recordset.Edit / Update problem

3. Update or CancelUpdate without Edit or AddNew

4. - addnew, edit, update, delete

5. how i can use the dbgrid with database {edit ,addnew,update or delete the data}

6. Confusion with ADDNEW, EDIT, UPDATE

7. .Undo, .Edit, .Update, .AddNew Inconsistencies - freaking out!

8. DAO - AddNew/Update

9. DAO data control Edit/Update problem

10. HELP - Masked Edit Control & AddNew

11. HELP - Masked Edit Control and AddNew

12. VB update my mdb file without .addnew or .edit and .update!!!


Powered by phpBB® Forum Software