By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,688 Members | 1,233 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,688 IT Pros & Developers. It's quick & easy.

Auto populating a database

P: n/a
HI is it posible to auto populate an access database.?

I have 1 table structured
Index_ID. - Index & auto number
First_Name - Char50
Surname - Char50
Initals - Char50
Postcode - Char50
Email_Address - Char50
Mailshots - tick box
Allow3rdParty - tickbox
Customer_no - Char50

I want to populate all fields Adding 1,2,3,4,5,6,7,8
so index will auto update but I want first name dave1,dave2, dave3 ect...

Is this possible to do using VB6?

Many thanks

David Shorthouse
Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"David Shorthouse" <ab***@globalnet.co.uk> wrote in message news:<5e********************@brightview.com>...
HI is it posible to auto populate an access database.?

I have 1 table structured
Index_ID. - Index & auto number
First_Name - Char50
Surname - Char50
Initals - Char50
Postcode - Char50
Email_Address - Char50
Mailshots - tick box
Allow3rdParty - tickbox
Customer_no - Char50

I want to populate all fields Adding 1,2,3,4,5,6,7,8
so index will auto update but I want first name dave1,dave2, dave3 ect...

Is this possible to do using VB6?

Many thanks

David Shorthouse


Not entirely sure what you're asking...
you could do this by opening a recordset based on the table, assigning
values to the fields in the recordset and then updating multiple
times. So firstname or whatever would be something like...

dim rs as recordset
set rs = db.Openrecordset("tblNames",dbOpenTable)

For intCounter = 1 to 5
rs.Addnew
rs.Fields("FirstName")="Dave" & intCounter
rs.Fields("LastName")= "Smith"
...
rs.update
next intcounter

or something along those lines. but why do you want multiple copies
of the same record?
Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.