Results 1 to 4 of 4
  1. #1
    jnb22019 is offline Novice
    Windows 7 32bit Access 2003
    Join Date
    Jul 2011
    Posts
    9

    Default Value - Last Entry

    Some details first:

    Access 2010

    Main Form - Name of Company
    Sub form - Name of Employee
    Sub "sub" form - Date, hours worked, Purchase Order (PO)

    You may have guessed that I first select the company, I then select an employee from that agency and then write in the amount of hours, etc.



    What I want to do is that whenever I write I date on the sub "sub" form, both the hours and Purchase Order are automatically filled by the last entry for that same employee.

    Example -

    Company X
    - John Doe
    - 4/1/12 - 8 hours, PO # 1-11111111
    - 4/2/12 - automatically populated by last entry (above) and can be changed if necessary.

    Any ideas?

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Similar code to: http://access.mvps.org/access/forms/frm0012.htm in the BeforeUpdate event of the SubSubForm should do it.

  3. #3
    jnb22019 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    9
    Quote Originally Posted by RuralGuy View Post
    Similar code to: http://access.mvps.org/access/forms/frm0012.htm in the BeforeUpdate event of the SubSubForm should do it.
    The code is not working for me. I get nothing if I do the BeforeUpdate, BeforeInsert and not even a button with a click event.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Copy and Paste the code you are trying into a post here so we can see it.

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

Similar Threads

  1. Set default value
    By accessnewb in forum Programming
    Replies: 3
    Last Post: 08-17-2011, 06:24 PM
  2. Default value
    By Hatye in forum Access
    Replies: 1
    Last Post: 06-19-2011, 05:16 PM
  3. no way to set default export to .xls ?
    By yinchiao in forum Import/Export Data
    Replies: 0
    Last Post: 04-05-2010, 12:33 PM
  4. Replies: 4
    Last Post: 01-27-2010, 12:39 PM
  5. Replies: 1
    Last Post: 02-10-2007, 10:21 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