Results 1 to 9 of 9
  1. #1
    Suzie2012 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2012
    Posts
    17

    cannot find a record in the table with key matching fields


    im creating an invoice i have a section that when i select a customer i want it to populate their member info, If they are a member. If they are not it can show nothing. at the moment i have fields on the form to show their membership. when i select a customer that is a member everything works great. but if i select a non member i get the message "cannot find a record in the table with key matching fields"

    anyone have any suggestions of how i can make it work like i need it to. How ever its created i need to be able to see member info whether its controls, subform, or pop up box, when a customers is selected.

    Im using macros, not VB
    Click image for larger version. 

Name:	Untitled.png 
Views:	7 
Size:	24.4 KB 
ID:	7478
    Last edited by Suzie2012; 05-05-2012 at 10:43 AM. Reason: update

  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
    We need to see code and viewing the form in design would be helpful. Code really should not be needed to accomplish this. If you want to provide project 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
    Suzie2012 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2012
    Posts
    17
    at the moment that particular function doesnt have code on it Click image for larger version. 

Name:	Untitled2.png 
Views:	8 
Size:	45.0 KB 
ID:	7479

  4. #4
    Suzie2012 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2012
    Posts
    17
    here is a copy of the db
    Attached Files Attached Files

  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
    From what I can see in that image, I don't understand why you would get error message. The membership info is a subform and Master/Child Links properties should synchronize records. If there isn't a child record the membership info should just be blank. I just might have to analyse database directly so I can view tables, form properties, and test form behavior.
    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.

  6. #6
    Suzie2012 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2012
    Posts
    17
    Izzy M and Sophia M are not members, so you dont have to go through em all

  7. #7
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    What? Did you intend to attach file to last 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.

  8. #8
    Suzie2012 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2012
    Posts
    17
    i attached one a post up, right before you said u might have to analyse the db

  9. #9
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Did not see that post as I was composing mine. Must have something to do with youth baseball. I umpire Little League.

    The Invoice form RecordSource includes Membership table with an INNER join. This restricts records to those that have Player ID in both tables. Remove that table from the RecordSource. The other joins in the RecordSource are also INNER and should work but could change to 'show all records from Invoices ..."

    The ParentID combobox is locked. Change this to a textbox. To show the parent name, include the name fields from Parents in the form's RecordSource and bind textbox to LastName field. Could even create a field in the RecordSource with an expression that concatenates the name fields and bind to that constructed field.
    Parent: ParentLastName & ", " & ParentFirstName

    Set TabStop No on the Parent name and phone number textboxes. I like to make non-entry controls appear different from editable controls, usually a transparent backstyle.

    You have set Lookup properties at table level. Advanced developers shun this because when viewing tables we want to see real values. And since users are not viewing tables and queries directly, the Lookup is not needed for their convenience. http://dbageek.blogspot.com/2004/10/...fields-in.html
    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: 05-01-2012, 01:57 PM
  2. Replies: 1
    Last Post: 10-24-2011, 08:01 AM
  3. Replies: 11
    Last Post: 09-15-2011, 03:52 PM
  4. Replies: 1
    Last Post: 08-11-2011, 11:33 AM
  5. Replies: 5
    Last Post: 03-20-2010, 08:30 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