| Re: Auto populating a database -
06-04-2007, 08:54 AM
"David Shorthouse" <EMAIL REMOVED> wrote in message news:<5eudnUOp_f_6YVGiRVn-EMAIL REMOVED>...
> 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, ***igning
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? |