Results 1 to 6 of 6
  1. #1
    tagteam is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    494

    How to add multiple records where only the number changes

    My boss wants to be able to add multiple records where only on of the fields will change. This is a repair record and in this scenario all the work done to the cars is the same. Same date, same place, same time etc. The only thing that changes is the car number



    I would like to create a for that will allow him to enter all the information for place, date, cost, etc and then a field that will allow him to select a car from the dropdown and select add to list. He could then keep going and add as many cars to the list as he wants.

    Are the any ideas how to do this or any better suggestions.
    Thanks for any help,

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    Use code to set the DefaultValue property of each textbox with the entered value. This value will carry forward to next record when it is initiated by selecting the car. The value will be retained until another edit or the form is closed.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    tagteam is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    494
    I may not have explained myself clearly. For each group entry the value of the place, amount, date etc will change with each group entry. Your idea would work if I could create a form that autofills all the values from the last record. Then my boss could just change the car number after he has entered all the other information. Is there an easy way to do that?

  4. #4
    tagteam is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    494
    Can a Dlookup be used for this? I am not sure how this would work because I would only want the Dlookup to work after the first record has been saved.

  5. #5
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    My suggestion is to open form, enter data into a record, code will set the DefaultValue property of each control. Move to new record row, select the car, all the other fields will automatically populate.

    If you want the DefaultValues to be set with data from an existing record when the form opens, that can also be done with code.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  6. #6
    tagteam is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    494
    Thank you, I looked on the internet and found Allen Brownes code at allenbrowne.com/ser-24.html and with this I was able to accomplish what you are talking about.

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

Similar Threads

  1. Replies: 1
    Last Post: 01-24-2013, 05:50 PM
  2. Replies: 6
    Last Post: 07-25-2011, 01:54 PM
  3. The number of records in a query
    By Persist in forum Programming
    Replies: 3
    Last Post: 07-13-2010, 06:23 AM
  4. Replies: 1
    Last Post: 12-10-2009, 08:41 PM
  5. Multiple Part Number Look=up
    By nywi6100 in forum Reports
    Replies: 0
    Last Post: 09-27-2006, 11:38 AM

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