By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,056 Members | 1,296 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,056 IT Pros & Developers. It's quick & easy.

Filtering records

P: n/a
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
Dec 25 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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
Dec 25 '07 #2

P: n/a

Thanks I will try this.

On Dec 25, 6:48 pm, Salad <o...@vinegar.comwrote:
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
Dec 26 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.