Results 1 to 5 of 5
  1. #1
    Jamaluddin is offline Novice
    Windows 7 32bit Access 2003
    Join Date
    Dec 2011
    Posts
    16

    Question Prevent Duplication in Sub Form

    Hi All...



    Please refer the attached pic. Its a form to create the fee voucher and issue to student. The same form is used when student submit his fee.

    My question is that how I control the details section or sub form section so that the user only enters the fee head only once for each fee voucher. For example, for each voucher, the Course Fee enters once, the Admission Fee (if required) enters once.

    Here, the student details are in one table (tblStudents), the Voucher details is in separate table (tblVoucher) and the Fee Details are in separate table (tblFeeDetails).

    tblStudents contains the GRNO-PK, CRNo, Name, FatherName, DOB etc.
    tblVoucher contains the VoucherID-PK, FeePeriod, IssueDate, SubmitDate etc.
    tblFeeDetails contains the FeeDescription and Amount only.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Don't understand. What is 'fee head'? Are you trying to prevent duplicate Course Fee or Admission Fee entries?

    Is the Description a combobox?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Jamaluddin is offline Novice
    Windows 7 32bit Access 2003
    Join Date
    Dec 2011
    Posts
    16
    Fee heads are something like Description in Billing Invoices. For example, "Monthly Fee", "Library Fee", "Computer Lab Charges", "Admission Fee" etc. If user creates a new voucher, the user select the Monthly Fee or Library Fee or any fee only once from the drop down list and when he select the monthly fee again from the list by mistake or by force, a msgbox displayed with warning that the entry all ready exist.

  4. #4
    Jamaluddin is offline Novice
    Windows 7 32bit Access 2003
    Join Date
    Dec 2011
    Posts
    16
    Quote Originally Posted by June7 View Post
    Don't understand. What is 'fee head'? Are you trying to prevent duplicate Course Fee or Admission Fee entries?

    Is the Description a combobox?
    Yes the description is a combo box.

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Okay. You can either make the selected items unavailable in the RowSource as soon as selected or alert the user as to the error. I have seen code for this but never applied.

    Google: access vba combobox rowsource remove selected item

    You should get a lot of hits. Here is one http://www.access-programmers.co.uk/...ght=combo+list

    Review this for the warning approach http://bytes.com/topic/access/answer...uplicate-value

    Depending on approach, code could be in the BeforeUpdate or AfterUpdate event of the combobox.

    Another suggestion I ran across is at this thread http://www.access-programmers.co.uk/...d.php?t=188807
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 3
    Last Post: 01-05-2012, 09:57 AM
  2. Replies: 1
    Last Post: 11-21-2011, 07:58 AM
  3. Prevent Saving of Form
    By bburton in forum Access
    Replies: 4
    Last Post: 02-25-2011, 09:26 PM
  4. Prevent a form from closing
    By ksmithson in forum Forms
    Replies: 0
    Last Post: 07-15-2010, 12:49 PM
  5. Replies: 1
    Last Post: 06-25-2010, 09:56 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