HELP! simple question need simple answer 
Author Message
 HELP! simple question need simple answer

hello...

I am really bad at databases and VB5...
All I want to do is to add or remove a record from the current recordset.

The code "Data1.Recordset.AddNew" adds an empty record to the recordset...
but I'm not sure how to change what record is to be entered!

Please help. Thanks!



Mon, 15 May 2000 03:00:00 GMT  
 HELP! simple question need simple answer



Quote:
>hello...

>I am really bad at databases and VB5...
>All I want to do is to add or remove a record from the current recordset.

>The code "Data1.Recordset.AddNew" adds an empty record to the recordset...
>but I'm not sure how to change what record is to be entered!

>Please help. Thanks!

With Data1.Recordset
        .AddNew
        !Field1 = "something"
        !Field2 = 25
        .Update
End With

+-----------------------------------------------------------------+
| Tom Childers - Arlington, Texas                                 |

+-----------------------------------------------------------------+



Mon, 15 May 2000 03:00:00 GMT  
 HELP! simple question need simple answer

Look in help under update, edit. All considering recordset.

---
Alesh Mustar
VBBBN Vice-President

http://www.vbbbn.com



Mon, 15 May 2000 03:00:00 GMT  
 HELP! simple question need simple answer

Thanks a lot
It's working great

Untitled_1

Quote:



>>hello...

>>I am really bad at databases and VB5...
>>All I want to do is to add or remove a record from the current recordset.

>>The code "Data1.Recordset.AddNew" adds an empty record to the recordset...
>>but I'm not sure how to change what record is to be entered!

>>Please help. Thanks!

>With Data1.Recordset
> .AddNew
> !Field1 = "something"
> !Field2 = 25
> .Update
>End With

>+-----------------------------------------------------------------+
>| Tom Childers - Arlington, Texas                                 |

>+-----------------------------------------------------------------+



Mon, 15 May 2000 03:00:00 GMT  
 HELP! simple question need simple answer

Hi!
If you want add a new record, move to the last record first, so it will
be appended to your recordset.

Data1.Recordset.MoveLast
Data1.Recordset.AddNew
Data1.Recordset.Update
Data1.Recordset.MoveLast

First you move to the last record, then you add a new one, then you save
it, and then you move to it again.

If you want to delete a record, then first move to the one you want to
delete, then use:

Data1.Recordset.Delete



Fri, 26 May 2000 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. HELP! simple question need simple answer

2. HELP! simple question need simple answer

3. SIMPLE QUESTION : SIMPLE ANSWER?

4. SIMPLE QUESTION : SIMPLE ANSWER?

5. SIMPLE QUESTION, please SIMPLE ANSWER

6. Simple Question...simple answer???

7. Need quick answer to simple AddNew question...

8. A simple Mail problem in search for a equally simple answer

9. need help in simple program, very simple

10. SIMPLE SIMPLE ListView Question. Please help

11. Simple Question: Assigning Icon to an App : Simple Question

12. NEWBIE Needs simple answers!

 

 
Powered by phpBB® Forum Software