Results 1 to 4 of 4
  1. #1
    progenesis is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    2

    Question Product entry form- duplicate last record in table/copy/paste in new record

    This is what i have. i have been working on product database and i am new at access. i have made 1 database with access and am decent with excel formulas and wanted venture over to the world of access. i have a simple form with a combo box, for the person i am giving the product too, a text box, for the date i gave it, and another text box for the serial number of the product. when entering in the data it will be 20-30 serial numbers at a time for the same date and same person. My idea was to selectallrecords, copy, getnewrecord, paste then null the serialtxt. This works for a button(thanx button wizard). My problem with it is when inputting the serial numbers i am using a barcode scanner. i would have to click a button everytime to update the Table. How do i do the same without using a button? I have tried the onEnter function on the serialtxt and it would not let me enter in the serials.

    I have searched the forum/google and could not find anything that i seen as relevant and have been stuck on this for a couple days(not constant working on it, i do this in spare time while working).

  2. #2
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,016
    Why not simply use the AfterUpdate events of the Controls holding your person and date to set the DefaultValues for the Fields. From that time forward, until you either manually change the data or close your form, the data will be entered automatically for these Fields in each New Record. The code would go like this:

    Code:
    Private Sub YourControlName_AfterUpdate()
       Me.YourControlName.DefaultValue = """" & Me.YourControlName.Value & """"
    End Sub

    The above syntax is valid for Text, Number and Date Datatypes.

    You’ll need to do this for each Control that you want to 'carry forward.'

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

    All posts/responses based on Access 2003/2007

  3. #3
    progenesis is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    2
    worked perfectly. Thank you!


  4. #4
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,016
    Glad we could help!

    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: 4
    Last Post: 08-14-2012, 07:14 AM
  2. Copy-paste every other record into bew table
    By BorisGomel in forum Access
    Replies: 5
    Last Post: 02-09-2012, 03:52 PM
  3. Replies: 2
    Last Post: 06-06-2011, 04:18 PM
  4. Replies: 3
    Last Post: 03-23-2011, 11:37 AM
  5. Copy/paste to new record.
    By xbox1513 in forum Forms
    Replies: 1
    Last Post: 02-23-2011, 04:52 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