Matuag wrote:
Hell All,
My database has 3 tables Client, Devices and Job
Client and Device has One-to-Many Relationship
Client and Job has One-to-Many Relationship
Device and Job has One-to-Many Relationship
I have created a form which allows me to search a particular Client so
that its subform displays Devices for that client.
I want to create a form which allows me to view Jobs related to a
Client and its respective Device.
Hope I make some sense.
matuag
I take you have a form with 2 subforms; MainForm, JobForm, DeviceForm.
Open up the property sheet and click on the subform for Job. Set the
master/child link to the ClientID
In the OnCurrent event of the Job subform enter something like
Me!MainForm!DeviceForm.Form.Filter = "JobID = " & Me.JobID
Me!MainForm!DeviceForm.Form.FilterOn = True
since this is a continuous/datasheet form.
When you add a new client you will have to refresh the device form if
the JobForm's OnCurrent event doesn't fire . Maybe something like
Me!DeviceForm.Form.Filter = "JobID = 0"
Me!DeviceForm.Form.FilterOn = True
Wild
http://www.youtube.com/watch?v=tMjM7292eHk