Auto populating a database

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • David Shorthouse

    Auto populating a database

    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


  • Pieter Linden

    #2
    Re: Auto populating a database

    "David Shorthouse" <abuse@globalne t.co.uk> wrote in message news:<5eudnUOp_ f_6YVGiRVn-tA@brightview.c om>...[color=blue]
    > 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[/color]

    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.Openrecordse t("tblNames",db OpenTable)

    For intCounter = 1 to 5
    rs.Addnew
    rs.Fields("Firs tName")="Dave" & intCounter
    rs.Fields("Last Name")= "Smith"
    ...
    rs.update
    next intcounter

    or something along those lines. but why do you want multiple copies
    of the same record?

    Comment

    Working...