Adding Bulk Records

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

    #1

    Adding Bulk Records

    I have a table with fields:

    Node Slot Card Channel

    Each Card has 24 Channels so if I add a new card it looks like this:

    Node Slot Card Channel
    1 2 13 1
    1 2 13 2
    1 2 13 3
    1 2 13 4
    1 2 13 5
    .....
    1 2 13 24

    I would like to have the ability to enter a new card with only one
    entry rather than 24. How could this be done and could the same
    methond also be used to add multiple cards at once.

    Brian Ciccariello
    brian.ciccariel lo@pinetreenetw orks.com

  • pietlinden@hotmail.com

    #2
    Re: Adding Bulk Records

    One way...

    Create an unbound form (not writing directly to a table).
    Create fields for Node, Slot, Card. Format as numeric (integer)

    Sub AddRecords

    dim db as dao.database
    dim rs as dao.recordset
    dim intChannel as Integer

    set rs =
    dbEngine(0)(0). openrecordset(" SOMETABLE",dbop entable,dbappen donly)

    for intChannel=1 to 24
    rs.AddNew
    rs.Fields("Node ")=Me.txtNo de
    rs.Fields("Slot ")=Me.txtSl ot
    rs.Fields("Card ")=Me.txtCa rd
    rs.fields("Chan nel")=intChanne l
    rs.Update
    next intChannel

    rs.close
    set rs=nothing
    End Sub

    attach to a button. Run.

    Comment

    Working...