Results 1 to 4 of 4
  1. #1
    mlrucci is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2018
    Posts
    202

    Microsoft Access database engine cannot find a record ...

    Good afternoon,


    I am having difficulties with a subform in datasheet format. The subform is linked to the master form with SOWID. Works great. My subforrm fields are required to prevent errors. I am using the validation and Validation text areas for each field. When I attempt to see if it is working correctly, I receive the message below which is an Access generated message. It is only showing on "Product" field. Tall other validation codes are working perfectly. I have a one to many relationship Product to Price linking the tables. The query is strictly coming from the tblPrice.

    "Microsoft Access database engine cannot find a record in the table 'tblProduct' with the key matching fields 'ProductID'"

    I have the validation rules in place so the end user will understand what they are missing. Anyone know how to bypass the MS Access generated msgbox so that it will utilize the message I have in place?

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,825
    Is this a combobox?

    If you want to provide db for analysis, follow instructions at bottom of my post.
    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
    mlrucci is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2018
    Posts
    202
    Here is a stripped down version of my program. Hopefully this helps.


    PricingDBStripped.zip

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,825
    Should not be a combobox in subform for SOWID. This field will automatically populate with the SOWID value from main form. Users should not even have option to change. If you do want to allow that, then don't use form/subform - just have subform as a standalone or put it on an UNBOUND main form and don't use Master/Child links.

    No need to include tblProduct in subform RecordSource, just bind to tblPricing. Then need controls for other fields.

    There is no reason for users to see the autonumber key fields.

    Should not duplicate ProductType into tblPricing.

    Should users be able to navigate records on main form?
    Last edited by June7; 04-02-2021 at 08:32 PM.
    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: 13
    Last Post: 09-12-2016, 09:13 AM
  2. Replies: 3
    Last Post: 05-28-2015, 01:32 PM
  3. Replies: 6
    Last Post: 07-22-2014, 06:34 AM
  4. Replies: 4
    Last Post: 12-27-2012, 02:10 PM
  5. Replies: 6
    Last Post: 10-30-2010, 08:42 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