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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB 6.0 Database "Clear" question 1

Status
Not open for further replies.

slurpee7

IS-IT--Management
Apr 30, 2003
6
US
I'm new to programming and have what I think should be an easy problem/issue to program. I have a form that I'm using ADO to access/update/delete data from an Access db. Whenever I run the app and that form comes up, the first record in the database shows up in all the corrisponding fields. I need a way that the form is "clear" or empty when the form loads. Any help/suggestions would be awesome!! Thanks
 
By moving your ado's recordset to a new record before the form is displayed it will cause the form to come up with all clear fields.

form.load
ado.recordsource="SQL"
ado.recordset.addnew
ado.refresh
form.show

Something like that will make the form have clear fields.
If you enter any data though it will be added as a new record so you will need to be able to cancel any updates.

Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top