Go Back   Forum Care Forums > Development Reference Area > Visual Basic

Reply
 
LinkBack Thread Tools Display Modes
Auto populating a database
Old
  (#1)
David Shorthouse
Guest
 
Posts: n/a
Default Auto populating a database - 06-04-2007, 08:53 AM

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


   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Re: Auto populating a database
Old
  (#2)
Pieter Linden
Guest
 
Posts: n/a
Default 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?
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Contact Us - Forum Care Forums - Archive - Top