Results 1 to 6 of 6
  1. #1
    xx_phenom_xx is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Apr 2015
    Posts
    3

    Prevent Duplicates Upon Selection from Combo Box

    hi
    I have a combo box in ms access 2007 for movie titles. What i want to do it is when a customer tries to select a movie, they cannot select that same movie again if they want to borrow more movies. I want them to show an error message when


    they try to select a "borrowed movie". How can I do this?
    Thanks

  2. #2
    CJ_London is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,428
    you need to provide more information - the structure of the relevant tables and some sample data plus the rowsource of your combobox and details of the context in which it is being used - in a single form, a continuous form, on the header section or the detail section.

    Also please do not double post, select a forum section and if you don't get a response within a couple of days, try a different section, but advise that you have tried a different section and provide a link.

    Other posts here
    https://www.accessforums.net/forms/c...elp-52041.html
    https://www.accessforums.net/access/...lpp-52039.html

    Please read this link

    http://www.excelguru.ca/content.php?184

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,926
    Duplicate threads deleted.

    If you want to provide db for analysis, follow instructions at bottom of my post.

    Instead of the error message approach, it would be better to structure the combobox to not even include movies in the list that user already has. This does require a rather complex query structure for the combobox RowSource.

    You might take a look at the MS Lending Library database template.
    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.

  4. #4
    xx_phenom_xx is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Apr 2015
    Posts
    3
    hi, sorry about the duplicate threads

    my row source for the combobox is SELECT [Movie Table].[Movie Code], [Movie Table].Title, [Movie Table].[Rental Price]FROM [Movie Table]
    ORDER BY [Movie Table].[Title];


    It is being used in a single form

    This is structure of my movie rentals table

    Click image for larger version. 

Name:	Structure of table.png 
Views:	10 
Size:	98.2 KB 
ID:	20489

  5. #5
    xx_phenom_xx is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Apr 2015
    Posts
    3
    Hi june 7

    Yes I would consider this in my database
    If you would provide some steps , that would be great.

    Thanks

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,926
    The technique has been discussed in numerous threads, however, finding them again is not easy but here are a couple.
    https://www.accessforums.net/forms/p...orm-20177.html
    Start with post 11 in https://www.accessforums.net/queries...ria-45796.html

    Have you looked at the Lending Library db? I expect it has an example.

    Providing guidance would be easier if I knew your db structure. Want to provide it as already suggested?
    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. Prevent Group By eliminating duplicates
    By bruegel in forum Queries
    Replies: 3
    Last Post: 03-27-2014, 07:55 AM
  2. Dlookup to prevent duplicates
    By arothacker in forum Access
    Replies: 16
    Last Post: 02-12-2014, 11:40 AM
  3. Replies: 2
    Last Post: 01-04-2013, 09:04 PM
  4. How to prevent duplicates in said example
    By raymondbeckham in forum Forms
    Replies: 1
    Last Post: 04-11-2012, 03:29 PM
  5. Replies: 3
    Last Post: 02-10-2012, 11:34 AM

Tags for this Thread

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