Results 1 to 7 of 7
  1. #1
    pritesharyan is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2015
    Location
    India
    Posts
    32

    Post Selecting Product from combo box of subform adding new product in product table.

    see the below screen shot.
    i have a subform with combobox.
    when i selecting item from combobox it adding product to its respective table.
    hwo to prevent this behavior?
    Click image for larger version. 

Name:	automaticaly inserting record in product table.jpg 
Views:	22 
Size:	110.7 KB 
ID:	19841
    Download my project

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Sounds like the combo is bound to the product table instead of the orders table.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    The subform should be bound to OrderDetails table. Do not include Products table in the RecordSource.
    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
    pritesharyan is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2015
    Location
    India
    Posts
    32
    If i bound to OrderDetail then how i can populate all the product in sub form combo box?

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    It's row source is the products table, not its control source.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  6. #6
    pritesharyan is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2015
    Location
    India
    Posts
    32
    I have set Control Source property of Combobox to fkProductID(Primary Key) instead of Discription and Problem has been solved.
    Thank you so much @pbaldy for your humble suggestions.

  7. #7
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Happy to help!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 3
    Last Post: 01-18-2015, 06:05 PM
  2. Replies: 2
    Last Post: 08-14-2014, 11:49 AM
  3. Replies: 4
    Last Post: 04-26-2013, 08:32 AM
  4. Replies: 3
    Last Post: 02-26-2013, 05:07 AM
  5. Adding a product to a report
    By abarin in forum Reports
    Replies: 2
    Last Post: 05-31-2011, 09:01 PM

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