473,657 Members | 2,447 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Select Query criteria feeding from subform

2 New Member
Hi there,

I have created a form, "search" and a query "search_product ". The query returns the product information based upon the criteria for three of the fields, author, title or isbn. The field names on the search form are search_title, search_author and search_isbn. The string entered in the query criteria is:

Like [Forms]![search]![search_author]

This works perfectly. But now I need to take the search form and make it a subform in a form called "main". I edited the query to reflect the new position of the search field;

Like [Forms]![main]![search_subform]![search_author]

Now the query runs (no errors or asking what is contained in the field - when the main form is open in form view BUT it always returns every result from the query - nothing is being filtered.

My question is, why isn't the query working properly once I make the search form a subform and edit the query accordingly??
Sep 15 '06 #1
3 9675
PEB
1,418 Recognized Expert Top Contributor
Hi,

try:
Like [Forms]![main]![search_subform].Form!![search_author]

:)

Hi there,

I have created a form, "search" and a query "search_product ". The query returns the product information based upon the criteria for three of the fields, author, title or isbn. The field names on the search form are search_title, search_author and search_isbn. The string entered in the query criteria is:

Like [Forms]![search]![search_author]

This works perfectly. But now I need to take the search form and make it a subform in a form called "main". I edited the query to reflect the new position of the search field;

Like [Forms]![main]![search_subform]![search_author]

Now the query runs (no errors or asking what is contained in the field - when the main form is open in form view BUT it always returns every result from the query - nothing is being filtered.

My question is, why isn't the query working properly once I make the search form a subform and edit the query accordingly??
Sep 16 '06 #2
stevecat
2 New Member
I cannot thank you enough PEB!!!! I used [Forms]![main]![search_subform].Form![search_author] (single exclamation mark) and it worked like a charm. Thanks again.

Have a great day!

Hi,

try:
Like [Forms]![main]![search_subform].Form!![search_author]

:)
Sep 18 '06 #3
RobLoughrey
1 New Member
@stevecat
I'm a new user to access and I'm wondering if I'm missing somethign simple here. I have list box in a subform and I want that to control which records I see from a query. I've included some images below and I'm hoping you can help me find where I messed up.


Mar 14 '17 #4

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

Similar topics

4
17622
by: Therese A. Sorna | last post by:
Hello all... I am using Access 2002, and am trying to find a way for a user to be able to select multiple entries from a drop-down list. I am hoping that given a list as such: a b c d
19
3534
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 form, the subform returns the records based on the two criteria. The criteria used on the main form are values selected in two list boxes. When the user clicks on the first list box (lstCollege), it returns values in the second list box...
3
1011
by: cassandra.flowers | last post by:
Hi, I was wondering if it is possible (Using access) to have a query parameter as a drop down box rather than a text box? e.g. typing as criteria for a query produces a box with a text box for you to enter the parameter. Can any body enlighten me on how to turn this text box into a drop down box? And whether it is possible?
2
1716
by: JM | last post by:
Hello, I've created a Querydef in a Form_Load() sub. The form is a subform that no longer has linked child fields. The form is bound to this querydef. When I open the form, the fields are populated just fine. However, when I add a new record using the new record control at the bottom of the subform, it gets added with NULL for the two values that were in the original WHERE clause. For example, if my query was "SELECT batch, style,...
9
2853
by: MLH | last post by:
I have a table (tblCorrespondence) holding records with fields like , , , , , , , etc... About a dozen 's are defined and I often use queries to extract records of a given . That's pretty easy. But, recently, I wanted to list all "15" letters, a few of the above mentioned fields and one additional field: of nother letter "00" in the same row. That's the tough part.
7
3781
by: keliie | last post by:
Hello Just a quick question that I've spent a few hours trying to solve with no luck (although one would think this should be fairly easy). I have a form with a subform. The subform is based on a query. The criteria for the query is based on the user's input in the main form. One of the user inputs is a field called "Vendor_Name" (in the form of a combo box). I would like the query to run for all "Vendor_Name" if the user leaves the...
1
3878
by: Regnab | last post by:
I've got a form where the user can edit the lookups available in the database. It consists of a list box of the various categories on the main form, a checkbox on the main form and a sub form which displays the lookup values in a datasheet format. When a lookup values is no longer current, the user can untick the "Active" box in the datasheet and it will disappear (requeries the subform's recordsource query). On the main form, I have the...
0
2377
by: TD | last post by:
I have a main form with two subforms (both in datasheet view), neither of which are linked to the main form. The main form is based on a query that uses the bound column of a combobox on the main form as the criteria for the query. The combobox is based on a query that retrieves the name and record id of the customers. In the afterUpdate event of the combobox on the main form and both subforms are requeried. The first subform is based...
11
5593
by: woodey2002 | last post by:
This problem is driving me crazy. Hello there, i am trying to create a search form for records in my access database. The search form will contain text boxes and a multi select list box. The user can enter their search criteria eg. surname, reg num, etc. in the text boxes. The multi select list box allows the user to select multiple counties which they have the option of including in the search. The user should be able to select or omit the...
0
8310
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
8732
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7330
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...
1
6166
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
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
4155
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...
0
4306
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1955
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1615
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.