Results 1 to 3 of 3
  1. #1
    Lupson2011 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Aug 2011
    Posts
    68

    Multiple Subform records

    Hi, I am creating a database where it show financial accounts for an organisation, per fiscal year.

    I have created a form which has the organisation name, and the year end dates (both are combo boxes where you can choose which one you want)



    I have also created a subform which have all the necessary fields that need completing.

    The idea is to be able to input financial data for any given year end per organisation. E.g. org 1 2008/2009, org 1 2009/2010, etc...

    Each record in the subform will be unique to that year end and organisation. But that the subform will just be one record

    My problem is that I can input information in the subform,( inform view), but there is always the option to create a new record in the sub form, which I dont want to do.

    Also, sometimes when you fill a few years in for one organisation, e.g. 2009/2010, 2010/2011, when you choose a year you have already done, just to view the information, it creates another empty record for that year?

    Bascially what I am after is a way to ensure that each organisation has only one record per fiscal year, and no duplicated records are created. For example

    Or1 should have financial data for 2008/2009, 2009/2010, 2010/2011 and thats it. no matter how many times you click between the years, those are the only records that are displayed for Org1..

    Hope this makes sense? Help please?

    Marc

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,441
    make the year field your primary key, or change the ALLOW DUPLICATES property on the table for that field to NO. Any time someone tries to add another record with an existing year range a pop up message will appear saying the database will not allow duplicate values.

  3. #3
    Lupson2011 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Aug 2011
    Posts
    68
    THanks, I think that worked, although there is still one default empty record line that appears at the top..which changes depending on the next entry you put in. Minor though..

    cheers

    Lupson2011

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

Similar Threads

  1. Replies: 12
    Last Post: 08-30-2011, 03:36 PM
  2. Subform requery after multiple records selected
    By AccessBlues in forum Forms
    Replies: 8
    Last Post: 08-04-2011, 11:03 AM
  3. Prepopulate subform with multiple records
    By Erik Feenstra in forum Forms
    Replies: 1
    Last Post: 05-02-2011, 07:28 AM
  4. Adding multiple records in subform
    By randolphoralph in forum Programming
    Replies: 1
    Last Post: 05-12-2010, 09:42 PM
  5. Replies: 1
    Last Post: 12-10-2009, 08:41 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