Results 1 to 6 of 6
  1. #1
    Modify_inc is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jul 2012
    Posts
    100

    Need to list history of Job Records linked only to the current Client Record being viewed

    I've created a form to manage my clients (ClientForm), and in this form, I created a text field to list only the jobs that are linked to the current client record being viewed. To accomplish this, I'm using a list box to display the job records via a query I created (qryClientJobs), and it appears to be working great, though with one serious flaw...the list is showing all jobs for every client, whether the job was assigned to the current client or not.

    The tblClients and tblJobs have a 1 to many relation. I created a query to query the jobs, but apparently, I don't know how to tell the query to only find and display the jobs that are linked to the current client record being viewed. Is there a function or expression that I can use to filter the job IDs, like if jobID equals current clientID then display Job?



    I've been out of the database scene for a while now, though thankfully a few things have come back to me, unfortunately, this is not one of them. Looking forward to any suggestions!

    Mike

  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,521
    The listbox could be based on a query that uses the form in the criteria. You'd requery the listbox in the current event so it changed when you changed clients.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    By the way, a subform would automatically sync with the main form via master/child links.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  4. #4
    Modify_inc is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jul 2012
    Posts
    100
    Quote Originally Posted by pbaldy View Post
    By the way, a subform would automatically sync with the main form via master/child links.
    I had forgot about subforms. I will definitely give it a try.

  5. #5
    Modify_inc is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jul 2012
    Posts
    100
    Quote Originally Posted by pbaldy View Post
    The listbox could be based on a query that uses the form in the criteria. You'd requery the listbox in the current event so it changed when you changed clients.
    I'm not sure I understand exactly what you're saying here, but I will attempt to figure it out if I don't have any luck with the subforms you mentioned.

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    No problem, post back if you get stuck.
    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: 0
    Last Post: 09-25-2012, 06:50 AM
  2. Replies: 2
    Last Post: 05-11-2011, 02:58 PM
  3. Client Payment History
    By GMatos78 in forum Access
    Replies: 4
    Last Post: 04-24-2010, 09:19 AM
  4. Client History
    By janjan_376 in forum Access
    Replies: 1
    Last Post: 06-23-2009, 02:44 AM
  5. Creating a list viewed by 2 criteria
    By phillyon in forum Queries
    Replies: 0
    Last Post: 12-01-2008, 11:46 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