Results 1 to 1 of 1
  1. #1
    atula7 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2011
    Posts
    1

    Question populate multiple rows using one form (looping?)

    Hi,
    I am new to access and I am using MS access 2010 .MDB database.



    I have a table called "ClientTbl" with several fields. I am trying, by using a single form, create (populate) several records (rows) in this table. All the rows supposed to be the same except “Client_nickname” (text), which value supposed to be letters “PB” + “Client_ID"(autonumber) .

    1) first i need by typing a number in specific field of the form to set the number of new records (rows)

    2) second I would type values into fields of the same form - like (DateOfEvent (date), PlaceOfEvent (text), event (text) etc.)

    3) than the loop or macro or whatever you think the best solution is - would use the “Customer_ID”(autonumber) in "ClientTbl", add letters “PB” and use them for the “Client_nickname”(text) field and populate the rest with values set in the form (DateOfEvent (date), PlaceOfEvent (text), event (text) etc.) and repeat this as many times as set by the customer.

    Example:

    I would start with this ClientTbl table:

    Client_ID - Client_nickname - DateOfEvent - PlaceOfEvent - Event
    -----------------------------------------------------------------
    1 - PB1 - 16.2.2011 - Boston - Annual Academy Award


    After filling the form and sending the data it should look like this:

    Client_ID - Client_nickname - DateOfEvent - PlaceOfEvent - Event
    -------------------------------------------------------------------
    1 - PB1 - 16.2.2011 - Boston - Annual Academy Award
    2 - PB2 - 21.2.2011 - Los Angeles - My Academy Award 2011
    3 - PB3 - 21.2.2011 - Los Angeles - My Academy Award 2011
    4 - PB4 - 21.2.2011 - Los Angeles - My Academy Award 2011
    5 - PB5 - 21.2.2011 - Los Angeles - My Academy Award 2011
    6 - PB6 - 21.2.2011 - Los Angeles - My Academy Award 2011


    If anybody can help I would by very grateful.
    Peter
    Last edited by atula7; 02-14-2011 at 07:10 AM.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 0
    Last Post: 11-30-2010, 12:51 PM
  2. Concatenate Multiple Rows into One
    By Knarly555 in forum Queries
    Replies: 5
    Last Post: 11-12-2010, 06:51 PM
  3. Inserting multiple rows using a value in a field
    By z1efuller1 in forum Queries
    Replies: 1
    Last Post: 01-06-2010, 11:20 AM
  4. Replies: 5
    Last Post: 12-10-2009, 10:33 PM
  5. Combine multiple rows into one cell
    By zarfx4 in forum Queries
    Replies: 8
    Last Post: 06-08-2009, 10:42 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums