Results 1 to 4 of 4
  1. #1
    RhI098 is offline Novice
    Windows 10 Access 2016
    Join Date
    Sep 2021
    Posts
    4

    Combo box filtering - Error 3341 Current field must match the join key '?'

    Hi, I'm trying to filter using cascading combo boxes, Responsible Technicican > Category > ItemID


    The filtering appears to work but when I try to make the selection in the last combo box (ItemID) I get the following error
    Table relationships look like this Click image for larger version. 

Name:	TableRelationships.jpg 
Views:	10 
Size:	105.2 KB 
ID:	46306
    Please help I dont understand the error
    Attached Thumbnails Attached Thumbnails Error1.png  

  2. #2
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    Haven't experienced this error, but a similar one. You don't really say which table the combos are bound to (e.g. ItemID is in 3 tables) but I suspect your issue is that you're trying to pick child values (the many) before you pick the parent value (the one side of the relationship). So I think Items.ItemID is the last combo. Also thinking that your form is based on a multi-table query which can raise this problem. In that case, changing your query join(s) to outer joins might help. A better approach may be a main form with subform(s).
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    RhI098 is offline Novice
    Windows 10 Access 2016
    Join Date
    Sep 2021
    Posts
    4
    Thanks, correct all combo boxes are from Items table. These are in a subform based on LoanItems and Items tables. Ive tried changing the joins in the relationships but still getting the error. is this the same as query joins?Click image for larger version. 

Name:	loanform.png 
Views:	5 
Size:	31.4 KB 
ID:	46308

  4. #4
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    Ive tried changing the joins in the relationships but still getting the error. is this the same as query joins?
    Not really. You could potentially use different query joins as long as they don't violate any relationships you've defined.

    I'm not following why the controlsource (or are you saying recordsource?) for 3 combos are from the same table or query. The behaviour in your 1st post suggests the combos are bound (have a controlsource) yet you say you're filtering. You don't bind filtering combos. Nor would you ever pick the Primary Key (ItemID) from a combo (unless maybe it is meaningful data instead of an autonumber ID).
    Responsible Technicican > Category > ItemID
    Maybe all you have to do is remove the controlsource property to eliminate the error, but that still leaves me confused about the other things. So are you filtering records or creating/editing them?

    Can you copy db, compact, zip and post the copy and include instructions on how to replicate?
    Last edited by Micron; 09-28-2021 at 10:58 PM. Reason: clarification
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. Replies: 2
    Last Post: 06-17-2018, 12:07 AM
  2. Replies: 2
    Last Post: 08-16-2012, 10:02 PM
  3. Error with filtering subform using 2 combo boxes
    By dharmacloud in forum Forms
    Replies: 4
    Last Post: 08-22-2011, 10:46 AM
  4. Form error "the current field must match..."
    By plavookins in forum Forms
    Replies: 0
    Last Post: 04-13-2011, 07:42 AM
  5. Replies: 1
    Last Post: 12-02-2010, 04:54 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