Results 1 to 2 of 2
  1. #1
    kenkard is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2013
    Posts
    1

    Creating Form with Multiple Records all with a common date


    I'm brand new to Access and am trying to creat a simple form. It's based on a table called "purchases" which contains a date, item #, qty & price and you can see that I created a real basic one in the attached file. Trying to make something where we only need to enter the date once but then have an unlimited number of records to add as some days there could be 2 purchases and sometimes 50. I'd envision the titles going accroos the top and the records going down the side. Guess an old man needs to go back to school.Purchases (2).zip

  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
    You can use the AfterUpdate event of the Control holding your data to set the DefaultValue for the Field. From that time forward, until you either manually change the data or close your form, the data will be entered automatically in each New Record.

    Code:
    Private Sub Purchase_date_AfterUpdate()
     Me.Purchase_date.DefaultValue = """" & Me.Purchase_date. Value & """"
    End Sub

    which is valid for Text, Number and Date Datatypes. Never tried it on a Yes/No Field!

    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: 16
    Last Post: 11-14-2012, 01:39 AM
  2. Replies: 3
    Last Post: 10-18-2012, 02:25 PM
  3. Creating 'Common' VBA code
    By Nevsky78 in forum Programming
    Replies: 4
    Last Post: 06-18-2012, 02:07 AM
  4. Creating multiple records from a single form
    By secretary in forum Forms
    Replies: 8
    Last Post: 07-18-2011, 04:03 PM
  5. Replies: 4
    Last Post: 01-25-2010, 04:14 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