Filtering records

Filtering records

am 25.12.2007 10:16:20 von Matuag

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

Re: Filtering records

am 25.12.2007 14:48:20 von Salad

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

Re: Filtering records

am 26.12.2007 19:46:11 von Matuag

Thanks I will try this.

On Dec 25, 6:48 pm, Salad wrote:
> 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
>
> Wildhttp://www.youtube.com/watch?v=tMjM7292eHk