473,406 Members | 2,273 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,406 software developers and data experts.

Filter SubForm

59
I have two forms:
clients
orders

when they both open, when I change clients it automaticly filter the orders for that client.

now I created a form which includes 2 sub forms inside it... (clients and orders)

and it doesn't filter since there is no such form open...
Forms![orders].Filter = "[CustomerID] = " & Me.[CustomerID]


how do I filter a sub form ?
Sep 7 '07 #1
3 5967
FishVal
2,653 Expert 2GB
I have two forms:
clients
orders

when they both open, when I change clients it automaticly filter the orders for that client.

now I created a form which includes 2 sub forms inside it... (clients and orders)

and it doesn't filter since there is no such form open...
Forms![orders].Filter = "[CustomerID] = " & Me.[CustomerID]


how do I filter a sub form ?
Hi, zivon.

Subform form object could be referenced in the following way.
Expand|Select|Wrap|Line Numbers
  1. Forms![MainForm]![orders].Filter = "[CustomerID] = " & Me.[CustomerID]
  2.  
Sep 7 '07 #2
questionit
553 512MB
Hi Zivon

The subform does not have to be open when you want to filter it.
See an example how you can reference the subform from main form:

Expand|Select|Wrap|Line Numbers
  1. Me![SubForm].Form.Filter  = "[CustomerID] = " & Me.[CustomerID]
  2.  
If you are note in these forms:
Expand|Select|Wrap|Line Numbers
  1. Forms![MainForm]![SubForm].Form.Filter  = "[CustomerID] = " & Me.[CustomerID]
  2.  
This webpage would be of further help to you:
http://www.mvps.org/access/forms/frm0031.htm

Regards
Qi


I have two forms:
clients
orders

when they both open, when I change clients it automaticly filter the orders for that client.

now I created a form which includes 2 sub forms inside it... (clients and orders)

and it doesn't filter since there is no such form open...
Forms![orders].Filter = "[CustomerID] = " & Me.[CustomerID]


how do I filter a sub form ?
Sep 7 '07 #3
zivon
59
thank you : )
that worked perfect.
Sep 7 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Robert Neville | last post by:
I would like to add filter functionality to my database whether through the Main form or the subform. This question may be rudimentary, yet I have not less experience with filtering data outside...
2
by: Andante.in.Blue | last post by:
Hi everyone! I was wondering if there is a away to use Access 97's build in filter-by-form function but restrict its effect to just the subform. I have a parent form that shows the major...
7
by: damjanu | last post by:
Hi All; I need little help. I have a datasheet form. I allow user to do 'filter by selection'. My form contains a column with values. As user changes selections, I want to calculate totals....
2
by: cefrancke | last post by:
I have a form (no underlying record set) that has two separate sub-forms on it. Each sub-form has data from two different tables. Above each sub-form there is one unbound combo box with a SQL...
2
by: Lenin Torres | last post by:
Hi everybody I have an Union Query that works fine. I used this query as the RecordSource for a Form. That Form is used as a subform in another form. Everything works fine, except for the "Filter...
3
by: dhowell | last post by:
In reading some of the posts on this group, it appears as though it is not strait forward at all to filter a form, which has subforms, by criteria which are either on subforms or span more than one...
0
by: Stinky Pete | last post by:
Hi, The db I'm trying to update has a report form from which all other statistical forms and reports are selected/printed by dept, type, cost, number etc. The report form uses a date filter to...
2
by: Matthew Wells | last post by:
Hi there. I am a programmer for a living, but this problem has my whole team stumped. I have a subform based on a query. I'm not using the "LinkMaster/ChildFields" properties ( I have my...
0
by: diogenes | last post by:
"Rick Brandt" <rickbrandt2@hotmail.comwrote in news:bPnKj.456$%41.325 @nlpi064.nbdc.sbc.com: I used this approach, and it works a treat! ID In(SELECT Order_ID FROM orderitems WHERE NAME =...
1
by: woodey2002 | last post by:
Hi Everyone and many thanks for your time.. I am trying to begin access and a bit of VBA i am enjoying it but I have a annoying problem I just can’t get any where on. My databse mostly includes...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
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.