Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2004
    Posts
    14

    Unanswered: Automatic Record Creation

    Hi!

    I am using Access 2k. Here I want to put only number i.e total no of records to be created and other fields value in a single form. Whenever I click on the Add button it will create all the recordsets with the same field value in a single shot.

    Ex - table "sample" contanis VId(auto number), Name(text), Company(text)

    In the form one unbound field (suppose type 100), name(type anything), company(type anything). Whenever I click on the Add Button, it should create 100 records.

    How can I do this very easily?

    thanks
    Subho

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    What? YOu want to create 100 duplicate records?


    ....


    Why?
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Jun 2004
    Posts
    55
    That's what I want to know.

  4. #4
    Join Date
    Jun 2004
    Posts
    14
    No duplicate recored creation. Because autonumber differentiate all the records. Just tell me how this is possible?

    Subho

  5. #5
    Join Date
    Apr 2004
    Location
    Sydney Australia
    Posts
    369
    A simple but crude way.

    Make a form based on the table that is to hold these records.

    Make a macro attached to OnClick for your button.

    The macro actions are
    Echo Yes So you can watch them whizz through
    DoMenuItem Save Record . Might be called DoCommand in A2000
    OpenForm
    GoToRecord New
    SetValue The text boxes you fill in to the corresponding field in the form that is opened

    Now make another macro to run that macro with RunMacro action and enter 100 from RepeatCount.

    If you want it run more or less than 100 times make another unbound text box on yoru form and enter the number of times to run and then for RepeatCount enter

    =[Forms]![YourFormName]![TextBoxName]

    Mike

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •