Results 1 to 3 of 3
  1. #1
    smorgan@trpd is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Oct 2013
    Posts
    1

    Question Repeat value into multiple records

    I would like to setup a form such that the user enters a location code (BEACH, LAKE, ADMIN etc) once and then complete other fields in multiple. When the records get saved in the database, the location that was entered once will be repeated for each record in the location field.

    Top half of form, enter a location

    Bottom half is a data grid/table where rapid data entry would take place into multiple fields using a barcode scanner acting as a keyboard emulator. Some example fields in the data grid are: species, quantity, origin.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,622
    One approach is to use the BeforeUpdate event of a control to set its DefaultValue property to the value just entered. Each new record will then apply that DefaultValue until a different value is entered and then that will become the DefaultValue. Like:

    Sub comboboxname_BeforeUpdate(Cancel As Integer)
    Me.comboboxname.DefaultValue = Me.comboboxname
    End Sub
    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
    Dal Jeanis is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Dallas TX
    Posts
    1,742
    And, put your repeated field(s) on the header and hide them on the detail, with the detail control set to default as June said.

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

Similar Threads

  1. Replies: 30
    Last Post: 08-15-2012, 02:25 PM
  2. How to repeat data?
    By djclntn in forum Forms
    Replies: 4
    Last Post: 06-29-2012, 05:08 PM
  3. Do not repeat pictures
    By gabrielharo in forum Forms
    Replies: 1
    Last Post: 06-12-2012, 04:58 PM
  4. IIF Expression - No Repeat Please
    By turnbuk in forum Queries
    Replies: 2
    Last Post: 08-11-2011, 02:50 PM
  5. Problem with Trying to Repeat Records in VBA
    By P5C768 in forum Programming
    Replies: 9
    Last Post: 09-22-2010, 12:09 PM

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