Results 1 to 5 of 5
  1. #1
    marq is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2010
    Posts
    1

    how to set (in a form) a default equal to previous entry value

    Hi all, i really hope you can help me!

    i am creating a Data Base and i prepared a form to record all the invoices i receive into the INVOICE tab.
    Since 3 fields as SUPPLIER, DATE, INVOICE NUMBER must be copied many times i am trying to set the form so when i click on the button ""NEW ENTRY" the previous entry will be copied to the new one, applying just to these three fields i told you.



    Could you explain me how does it work?

    thanx

  2. #2
    Rainlover's Avatar
    Rainlover is offline Expert
    Windows XP Access 2003
    Join Date
    Nov 2009
    Location
    Queensland Australia
    Posts
    691
    Marg

    You don't do it that way.

    Have you read up on Normalisation.

    You need a Main form that hold the data you talked about then a sub form that is linked via a Key.

    Google Normalisation or if you prefer Normalization.
    Last edited by Rainlover; 01-26-2010 at 11:27 PM.

  3. #3
    Sarina is offline Novice
    Windows XP Access 2003
    Join Date
    Jan 2010
    Posts
    1
    I wanted the category for each record to reproduce the last entry that was made in the category for the previous record. This is how I did it.

    In the events tab: After Update: Select Event Procedure:

    Private Sub Category_AfterUpdate()
    Me!Category.DefaultValue = """" & Me!Category & """"
    End Sub

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    As Rain stated, your tables appear to not be normalized. You can do it the way you are doing it but it will cause you quite a bit of grief in the future trying to get the right data back out of the system. You should really read up on normalization as he suggested before you get too far into the project and data entry.

  5. #5
    jbarrum is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Apr 2009
    Location
    Houston, Tx
    Posts
    164
    Marc,

    The concern by RG and Rainlover is that you are duplicating invoices numbers. An invoice number is typically unique so why would you want to do that?

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

Similar Threads

  1. Replies: 2
    Last Post: 01-13-2010, 05:29 AM
  2. Replies: 2
    Last Post: 11-04-2009, 09:45 PM
  3. Set Numbers equal to each other
    By ygu3 in forum Access
    Replies: 1
    Last Post: 07-16-2009, 07:34 PM
  4. update default value in form
    By leah7au in forum Access
    Replies: 3
    Last Post: 05-14-2009, 07:11 AM
  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