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

DataBase Help

Status
Not open for further replies.

Travis33

Programmer
Nov 20, 2000
31
0
0
US
I have a database with one table and one form. I am building it to test the search feature when you have 20,000+
records. I have five fields(auto number,number,date,time,string) I have a command button that I want to be able to click and it writes 20 new records to the table. I want them to be auto generated so i don't have to type anything in. Can someone please help me. Thank You Travis
 
you could do all 20,000 at once instead of having to hit the button 1000 times but heres the code to do 20 records at a time

place this code in the buttons on click event

dim rst as recordset,T as interger
set rst = me.recordsetclone
for t = 1 to 20 'Replace 20 with 20,000 to do it all at once
rst.addnew
rst!number = t
rst!date = Date()
rst!time = Now()
rst!string = "record" & t
rst.update
next
rst.close

 
Thank You so much braindead2 it worked great

Travis
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top