Results 1 to 8 of 8
  1. #1
    Amanda003 is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Feb 2014
    Posts
    9

    Autofill new record w/data from last record

    I apologize if this has been answered already. I have been searching all day for a solution. This is my first time using Access so a lot of this goes over my head. I'm currently running Access2010.

    I have a form that I am using for when people take office supplies and we can generate a cost per department. All of the Tables, Query and Reports are set up already and surprising work.

    My form fields are:

    Date Created (automatic current date)
    Quantity
    Item Code (Combo Box that shows Item# and Item Description)
    Initials
    Department (Combo Box that shows Dept# and Dept Description)
    RefCode
    Remarks



    I am trying to get it to where when I enter a new record it will autofill with all fields expect "Item Code" from the previous record until I change it?

    Thank you in advance

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922

  3. #3
    Amanda003 is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Feb 2014
    Posts
    9
    I have tried this code and kept getting errors, I'm sure I'm not entering the information right. Like I said this stuff goes over my head.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Where did you put the code and what errors were you getting?

  5. #5
    Amanda003 is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Feb 2014
    Posts
    9
    I put it in "After Update" property field. Here is the error:

    Click image for larger version. 

Name:	error.JPG 
Views:	13 
Size:	30.3 KB 
ID:	15457

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    It looks like you had it in the "BeforeUpdate" event.

  7. #7
    Amanda003 is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Feb 2014
    Posts
    9
    I apologize, I really have no idea what I'm doing. This is what I have tried to enter.

    Click image for larger version. 

Name:	Coding.JPG 
Views:	12 
Size:	49.1 KB 
ID:	15461

  8. #8
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Actually, that looks pretty good except it should be in the Form's BeforeUpdate event.

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

Similar Threads

  1. Autofill text field on new record
    By TheHarleygirl2005 in forum Programming
    Replies: 3
    Last Post: 08-28-2013, 10:42 AM
  2. Replies: 5
    Last Post: 07-19-2013, 03:42 PM
  3. Replies: 3
    Last Post: 02-06-2013, 07:23 PM
  4. Creating unique record from record and field data
    By arthurpenske in forum Access
    Replies: 3
    Last Post: 08-24-2011, 06:11 PM
  5. Replies: 5
    Last Post: 09-14-2010, 09:50 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