Question List history of Job Records linked only to the current Client Record being viewed

Modify_inc

Registered User.
Local time
Today, 04:22
Joined
Mar 25, 2013
Messages
20
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
 
As answered elsewhere:

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.

By the way, a subform would automatically sync with the main form via master/child links.
 
I also tend to use a subform rather than a listbox for things like this. But the listbox works if you don't need to show many columns or filter/sort the list. You can use the click event of the unbound listbox, to open a popup form with the details of a particular job.

Scrolling to a new record should take care of syncing the listbox's RowSource as long as it's Where clause refers to the ClientID on the main form.

I don't quite follow you, but I will try to figure it out if the subforms don't work out. I've used subforms before so I'm confident they will work.

Thank you
 

Users who are viewing this thread

Back
Top Bottom