473,789 Members | 2,860 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Filter subform based on a query .

25 New Member
Hello ,

I am using MS Access 2007. Now if i ve a subform based on a table, filtering the subform is extremely easy . I only ve to click the relevant column head on the subform and check/uncheck the required records (clicking on the column head would yeild a drop down list).

However , since my subform is based on a query , i cannot avail the filter option using the above method. I get the error no 3075.

Can somebody please help me here,

Thanks a lot.

Regards,

Shreyans.
Oct 4 '07 #1
13 4702
shreyansghia
25 New Member
Also , as an alternate what i can do is have a combo box on the main form. The combo box will have for example purchase order no. So i should see only those records in subform which bears the purchase order no as i ve selected from the combo box.

Is this possible?

Thanks in advance.
Oct 5 '07 #2
NeoPa
32,579 Recognized Expert Moderator MVP
Check out Example Filtering on a Form. and see if that helps.
Otherwise your explanation doesn't really give much information.
Let us know if you need more help with this.
Oct 5 '07 #3
shreyansghia
25 New Member
Check out Example Filtering on a Form. and see if that helps.
Otherwise your explanation doesn't really give much information.
Let us know if you need more help with this.
Well NeoPa thanks for the above link . I could nt explain my requirement precisely earlier because i think it is really very complicated.

Anyways i would be really greatful if u could provide me with any link as how do i filter a subform when i make any selection from a combo box which would be on the main form.
Oct 7 '07 #4
puppydogbuddy
1,923 Recognized Expert Top Contributor
Well NeoPa thanks for the above link . I could nt explain my requirement precisely earlier because i think it is really very complicated.

Anyways i would be really greatful if u could provide me with any link as how do i filter a subform when i make any selection from a combo box which would be on the main form.
this code goes on main form...YourSubf ormControlName is the name of the subform container, not the subform (i.e. the source object).

Expand|Select|Wrap|Line Numbers
  1. Private Sub YourComboName_AfterUpdate()
  2. Me!YourSubformControlName.Form!YourComboName.Requery
  3. End Sub
See this link:
http://www.mvps.org/access/forms/frm0031.htm
Oct 7 '07 #5
NeoPa
32,579 Recognized Expert Moderator MVP
Well NeoPa thanks for the above link . I could nt explain my requirement precisely earlier because i think it is really very complicated.

Anyways i would be really greatful if u could provide me with any link as how do i filter a subform when i make any selection from a combo box which would be on the main form.
So providing the question is too much trouble but you'd like us to work in the dark and give you an answer anyway.
Priceless.
This without even bothering to check out the link already provided.
Oct 7 '07 #6
shreyansghia
25 New Member
So providing the question is too much trouble but you'd like us to work in the dark and give you an answer anyway.
Priceless.
This without even bothering to check out the link already provided.

Hmm , this is what i ve typed in the after update event of the combo box.

Expand|Select|Wrap|Line Numbers
  1. Private Sub Combo33_AfterUpdate()
  2.  
  3. Me![DeliverySchedule subform].Form!Combo33.Requery
  4. End Sub
So when i select my desired option from the combo box, what i get is
run time error 2465. It also says that combo33 cannot be located .
Oct 8 '07 #7
puppydogbuddy
1,923 Recognized Expert Top Contributor
Hmm , this is what i ve typed in the after update event of the combo box.

Expand|Select|Wrap|Line Numbers
  1. Private Sub Combo33_AfterUpdate()
  2.  
  3. Me![DeliverySchedule subform].Form!Combo33.Requery
  4. End Sub
So when i select my desired option from the combo box, what i get is
run time error 2465. It also says that combo33 cannot be located .
My fault.Combo33 is on the main form, not the subform:

Me!Combo33.Requ ery
Oct 8 '07 #8
shreyansghia
25 New Member
My fault.Combo33 is on the main form, not the subform:

Me!Combo33.Requ ery
Ok i incorporated the change suggested by u. What i get now is error 438 ; 'object does'nt support the property or method'. :-(.
Oct 8 '07 #9
puppydogbuddy
1,923 Recognized Expert Top Contributor
Ok i incorporated the change suggested by u. What i get now is error 438 ; 'object does'nt support the property or method'. :-(.
That should have worked, Please post the sql you have for the row source for combo33.
Oct 8 '07 #10

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

Similar topics

1
7850
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 from queries. Let me just add that Allen Browne excellent article about this subject may not apply to this scenario on an elementary level. (Here's the link to the article; Filter a Form on a Field in a Subform -...
2
9809
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 divisions of the company, and a subform that is linked so that it displays all the jobs within the division in the parent form. I also want the ability to filter the subform, so the users can pick out a bunch of common jobs easily. I did this using a...
0
2765
by: Colin | last post by:
In access 2000 I need to filter records in a Subform by pushing a button on a command button located on the Main form. The Main form is blank. Its only purpose is to contain the subform which is in a datasheet format. So far… 1)I have created a query called "CatFilterQuery" which results in a prompt to enter the "category field" to filter on. 2)Created a macro called "FilterCategory" which is based on the query mentioned above and uses...
3
2770
by: Tony Williams | last post by:
Sorry to repost but I cannot work this out. Can anyone come up with a suggestion? I have a main form based on Table1. The form has a tab control of three pages. Each page has a subform based on a different table ie subform1 based on Table2, subform2 based on Table3 and subform3 based on Table4. I want the user to be able to use the Filter By Form facility in Access but this does not work when trying to select controls on the main form AND...
3
11970
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 subform..... This MSDN article however makes it sound as simple as clicking "Filter by Form", entering the search criterial in the form and/or it's subforms, then just clicking "Apply Filter"...... ...
14
4092
by: Anja | last post by:
Hi everyone, I have a sub form that references a query to get the results. However, what I want to do is filter the results further based on a certain criteria. How can I tell the sub form to filter results based on a certain criteria. I tried using the Filter and OrderBy fields in the designer but they seem to have no affect!
9
15846
by: natwong | last post by:
Hi All, I'm a newbie in terms of Access and some of its functionality . I've been stuck on this problem for a couple days, even after searching the Web, etc. Currently I have five combo boxes (actually list boxes) that are multiselects in my main form. I need to use these combo boxes to filter a subform within my main form. My combo boxes are as follows: 1. A - 4 select options 2. B - 10 select options 3. C - 4 select options
2
4207
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 reasons ). The ssbform's query has a criteria for forms!masterform!Keyfield. This works fine on open. I have an options group with two options - True or All. Selecting True adds a filter to the subform's fitler property "Billed = True". That...
2
8631
by: cluless | last post by:
I'm relatively new to access, and I'm trying to create a form where if I click on a selection of a list box the subform below it will be filtered automatically on click (I was hoping I didn't need a seperate "Filter" command button on the side, but I guess that would work just as well). The list box is titled List46, and has two columns (let's just say column A and column B), and the subform is titled , and has 10 columns that are based on a...
0
9511
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10410
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10139
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9020
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6769
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5418
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4093
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3701
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2909
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.