473,397 Members | 2,084 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Filtering records

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
2 1797
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

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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jason | last post by:
I am trying to filter records in a primary form based on records in related tables. The data in the related tables is being displayed in the primary form through subforms. To be more specific, I...
2
by: Luther | last post by:
I want to create a form that searches a table. The hard part is this, I'd like to have the available records filtered based on combobox selections. For example, if this were a vehicle database, I...
5
by: Richard | last post by:
Hi, I have a form that take some time to load due to many comboboxes and at least 8 subforms. When I filter or sort the main form I get an error message and then Access shuts down. They ask if...
19
by: William Wisnieski | last post by:
Hello Everyone, I have a main form with a datasheet subform that I use to query by form. After the user selects two criteria on the main form and clicks the cmdShowResults button on the main...
7
by: | last post by:
Hello, Does anyone have an idea on how I can filter the data in the gridview control that was returned by an sql query? I have a gridview that works fine when I populate it with data. Now I...
5
by: LDD | last post by:
Hi Folks I'm trying to determine a way to handle paging, filtering and sorting in a datagrid. If I choose to filter and sort, I'd like to return a subset. If that resultset has more records...
1
by: hackerslacker | last post by:
I have an ordering form that use two combo boxes to filter down the records of a Products table. This worked fine with the after_Update of the first filtering the records and creating the...
3
by: paquer | last post by:
On my Main form I have a Command Button that opens a Subform in order to create a new Subform record. At this point I want the subform to show only the new record being created. Not all the...
2
Scott Price
by: Scott Price | last post by:
Hello again! Running MS Access 2003 on WinXPproSP2. Now I'm trying to re-filter my subform based on the currently shown Year field (the filter applied on open restricts to 15 records relating...
0
by: Lyn | last post by:
I have a problem using the form .Filter and .FilterOn properties which causes Access to crash (as detailed in a separate post). The form operates in continuous mode, displaying matching records...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.