Results 1 to 5 of 5
  1. #1
    rashima is offline Novice
    Windows Vista Access 2010 32bit
    Join Date
    Mar 2012
    Posts
    16

    Multiple records in a subform

    I have a unbound subform on my main form and I want my users to enter multiple records into this subform so on button click I can save these records into database (sql-server)

    But I can only enter 1st record, its not going to 2nd record....any help

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,530
    If you want to enter multiple records, the form has to be bound. If you don't want to bind it to the actual table, you can use a local table and copy the records in your button click.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Quote Originally Posted by rashima View Post
    ...I can only enter 1st record...
    In point of fact, you cannot even enter one Record, because Unbound Forms contain no Records! What you're actually doing is entering data into a group of Controls. As Paul said, to enter Records your Form has to be Bound to something, even if it is only a temporary or local Table.

    But in taking this route you're really making an huge amount of unnecessary work for yourself! Why do you feel that this has to be done with an Unbound Form?

    Linq ;0)>

  4. #4
    rashima is offline Novice
    Windows Vista Access 2010 32bit
    Join Date
    Mar 2012
    Posts
    16
    thx paul and missinglinq , can you suggest what is the best way to do this

    I have main input form with some controls where users can fill information and this information will be saved in a table(in sql-server via adodb connection) on button click.
    but together with this I have a child table also in sql-server which need to be filled with this unbound subform information.

    First I tried to use 3 listboxes to fill 3 fields info into child table but this is not very userfriendly if we have many records.

    I don't habe link tables just working with adodb connection, any suggestions ??

  5. #5
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Quote Originally Posted by Missinglinq View Post

    ...But in taking this route you're really making an huge amount of unnecessary work for yourself! Why do you feel that this has to be done with an Unbound Form?
    Still waiting for an answer as to why you feel it is necessary to do this with an Unbound Subform! Nothing you have posted even remotely suggests the need for it to be done this way, and you're making things unnecessarily hard for yourself. Perhaps if you explained why you're taking this approach we could suggest a much easier alternative.

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

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

Similar Threads

  1. Replies: 5
    Last Post: 04-20-2012, 10:07 AM
  2. Multiple Subform records
    By Lupson2011 in forum Access
    Replies: 2
    Last Post: 08-24-2011, 08:49 AM
  3. Subform requery after multiple records selected
    By AccessBlues in forum Forms
    Replies: 8
    Last Post: 08-04-2011, 11:03 AM
  4. Prepopulate subform with multiple records
    By Erik Feenstra in forum Forms
    Replies: 1
    Last Post: 05-02-2011, 07:28 AM
  5. Adding multiple records in subform
    By randolphoralph in forum Programming
    Replies: 1
    Last Post: 05-12-2010, 09:42 PM

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