Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How change the database via ADODC (ADO data control)

Status
Not open for further replies.

THOMASNG

Technical User
May 3, 2002
254
US
I've been able to successfully link my database vis
ADODC, and am not able to use it to conveniently review
my database.
I wish to be able to remove, add and modify its
records via ADODC. Can anybody help?
 
With ADODC1.Recordset
'Add record
.AddNew
.Fields("SomeField") = "ABC"
.UpdateBatch

MsgBox "A New Record Was Added"


'Edit Record
.Fields("SomeField") = "XYZ"
.UpdateBatch
MsgBox "A Record Was Changed (The newly added record)"

'Delete the record
.Delete
MsgBox "A Record Was Deleted (The newly added record)"

End With
[/b][/i][/u]*******************************************************
General remarks:
If this post contains any suggestions for the use or distribution of code, components or files of any sort, it is still your responsibility to assure that you have the proper license and distribution rights to do so!
 
Thanks for the assistance! It was a real help.
A slightly new problem :
After I change the database via ADODC, the display still
has the stats about the original database. How can I refresh
the display to reflect the new DB?
 
The keyword, .Requery, seems to do the trick for .AddNew.
I still get an error for .Delete, through.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top