Searching Form Based On Query

Dec 16, 2006

Hi,

I have a form that is based on a query with many fields. As an example there is a field called "Medium" which contains values such as "Oil on canvas", "Oil on wood" etc.

At the moment I have a filter which works fine but this doesn't allow me to search all records which have the word "Oil" as part of the Medium.

I would like to be able to search all fields on the form. I have looked at a few exmaples on the forums but could not find one that applies to my scenario.

Can anyone help?

Thanks in advance.

View Replies


ADVERTISEMENT

Searching A Query Using Pre-Defined Crieria On A Form :o

Apr 17, 2008

Hi there guys;

I'm after something quite complicated this time, so i'm going to do my best to explain it in the offchance that someone can help me out. I'm not sure that what i want is even possible, although i think it should be; i just dont know how to achieve it.

I have three entities; Table1, Query1, Form1.

Form1 and Query1 have both been created using Table1 with some basic data.
Form1 will have three text boxes titled:
Broker; Audit ID; Audit Date
Beneath these it will then have a search button.

The idea is that i will type "BrokerName" into the "Broker" field on the form, and using Query1, the search button will retrieve all lines of data that have "BrokerName" in the "Broker" field in the query. So it's like using the [Enter Broker Name] criteria in the query except the criteria is entered into a Form text box rather than a pop-up window. Does that make sense?

The remaining two fields, Audit ID and Audit Date, will need to ADD the data entered into those boxes on the form, in to the query. I *think* it needs to add the data in to the query before "BrokerName" is used to select the records with "BrokerName" in them.

After the records have been found using the "BrokerName" criteria, they would then be inserted as Subform1 on Form1. I figured i would need a refresh button for this to work effectively. I have already made a refresh button, but if anyone knows of a way to refresh it automatically after selecting the records i need, then that'd be great.

So i have the basic setup ready to go, i just dont know how to make Query1 use the criteria entered on Form1 to search specific data.

I really hope that makes sense, i'm not very good at explaining. Any help is hugely appreciated!

Thanks again.

View 6 Replies View Related

How Can I Get A PK In Another Table, Based On Searching ...

Feb 5, 2005

How can I get a PK in another table, based on searching for it based on 2 values. By searching with 2 values you will always get only 1 record.

READ BELOW FOR SITUATION

My Problem on my form:

The user enters 2 values, after entering the 2nd value a Unbound combo box runs a query, which searches for these 2 values (unique), that appear in a separate table.

These 2 values are unique toegether, but records in this separate table have another field, its Primary Key (AutoNumber), used to identfy the pair.

So back to this Unbound Combo Box that searched for the primary key of the 2 values entered. Now Only the Primary key can be selected from the combo, the value that I'm after.

But since there will only be 1 option (being unique), how can I have the PK value aready stored in an Unbound text box, as opposed to having options in a Combo box?

View 5 Replies View Related

Searching Database Based On 3 Columns

Aug 23, 2011

I have a requirement of searching the database based on 3 columns. I have attached the search form and the code.

Private Sub cmdSearch_Click()
Dim strSQLHead As String
Dim strSQLWhere As String
Dim strSQLOrderBy As String
Dim strSQL As String
Dim strJoin As String

[Code] .....

View 12 Replies View Related

Searching For Records Based Off Of One Field From A Table

Mar 19, 2014

I have a database that I am creating for my work. I have a form that I am trying to get it to search the information from a table to pull the record on the form. I would like to search infomation such as employee id and wanting it to pull that information from the table.

View 7 Replies View Related

General :: Searching For Records Based On Only Highest Autonumber

Jul 30, 2012

I have a database in which the year is stored in a table called year with as laid out below

"YearID" autonumber field and the
"Year" field which is a date field.

I am trying to search for records via a query for just the current year, i.e. the highest autonumber and I am having no success.

View 4 Replies View Related

Forms :: Parameter Based Query - Filter A Form Based On Another Form

Mar 20, 2013

I have a form which uses a parameter based query to present an individual senior doctor with a list of names for of individual juniors to provide an assessment report on. When the first form opens the user enters their RespondentID.

Once senior has decided which names to comment on I have another form which has the questions to be answered which is opened by clicking a button on the first form.

How can I pass a parameter from the first form to the second so that only the records relevant to that senior doctor are displayed? The underlying table has 60 senior doctors and 20 junior doctors. The senior doctor is identified by the field RespondentID in the first form. I've tried putting a WhereClause in the FormOpen command but I still get a dialogue box asking for the parameter RespondentID when the second form is opened.

View 2 Replies View Related

Queries :: Query To Run Before Report Based On Criteria Based From Two Combo Boxes On Form

Mar 20, 2013

I have a report that gets its data from a query. I need the query to run before the report based on criteria based from two combo boxes on a form.

View 3 Replies View Related

Chart Based On Form Based Parameter Query

Mar 22, 2006

Hi all,

stuck on this, not sure if it can be resolved....

I have a parameter query for which the parameter is based on a form field entry (i wanted to avoid the dialog box popping up).

No problems with this....however, I want to create a chart based on the same query however, i get the following error message because it does not recognise the query parameter.

Error Message: The Microsoft Jet database engine does not recognise '[Forms]![frmChooseDTDate]!DateOccured' as a valid field name or expression.

Can this be resolved?

Help most appreciated!

regards to all

K

View 2 Replies View Related

Searching On Form

Jul 21, 2005

http://lemmikki.uw.hu/promotion.JPG

Okay, this is how my form looks. I have thousands of records, but in a special way. I would like to make a search having the email, when and what together. The table is like this:


email1@xyz.com 20050712 E0001
email2@xyz.com 20050712 E0001
email3@xyz.com 20050712 E0001
email2@xyz.com 20050712 E0002
email3@xyz.com 20050712 E0002
email1@xyz.com 20050720 E0003
email2@xyz.com 20050720 E0003
email3@xyz.com 20050720 E0003
email4@xyz.com 20050720 E0003
email1@xyz.com 20050720 E0004
email4@xyz.com 20050720 E0004

Okay, there's a key for finding the records, but searching by it is quite difficult. Searching by these 3 data would make it easier. But it's quite difficult for me. I would like to have 3 lists (on the picture I have 2 so far) and a button that I can press and the record would come out...


Can someone help me?

View 4 Replies View Related

Searching Through A Form

Dec 20, 2005

Hi,

On my form i have a text box (txt_search) and a search button (cmd_search). Now when the button is pressed i want it to go to another form (that bit is done) and display the search results (the bit that is hard).

How can i get it so that when i click the button. It searches some predefined fields with the text in the txt_search once the button is clicked.

Thanks
k0r54

View 1 Replies View Related

Searching In A Form

Jul 26, 2006

I was looking for help to find out how i would put a search facility on a form

Ive written a query with a parameter where you input a persons name in order to find it in a table

the porblem is when i base a from on this query it brings up the parameter asking me to enter the name, the query works fine it does what i want it to do.

i want to be able to open the form and if i need the facility to enter a name an d bring the details up in a sub form

any ideas?

View 2 Replies View Related

Modules & VBA :: Searching Form Along With Other Forms In One Navigation Form

Jun 11, 2013

I have used one of the members' code which was posted in a tread before to create a search box in a form. This code works perfectly when the form itself is open. Otherwise, when I put this searching form along with other forms in one navigation form, I get the following error: "Enter Parameter Value: Forms!FRM_SearchMulti!SrchText"...The code that was used for the Search box is as following:

Private Sub SearchFor_Change()
'Create a string (text) variable
Dim vSearchString As String
'Populate the string variable with the text entered in the Text Box SearchFor
vSearchString = SearchFor.Text

[code]....

View 7 Replies View Related

Searching By Using A Query

Oct 1, 2005

I have a database and I made a query to search records. The query worked perfectly, but now the only problem is that if a search has an ID number that is bigger than 239, the results will not be displayed. The query will be empty! :S

What is the problem with my query?

Thanks in advance

Aber^28

View 2 Replies View Related

Searching Form Header

Apr 14, 2006

Hi all. This is one has been troubling me for quite a while and once more I seek for solution to the right (hope so) place.

I have imported from a Excel a table and based on that table I created a form. But when I try to add a combo box on the form header in order to search for a particular record to display on screen the error on the attachment occurs. I didn't add even a single character of code, and the error message seems weird.

I tried doing the same thing on another pc (an older one) and it is working fine...I've added search via combo boxes in the past without any problems but this time something isn't going right.

Any clues?

View 1 Replies View Related

Searching Within A Form Problem.

Apr 20, 2006

Hi,

Me and my friend are making a database for a DVD rentals business and we're having trouble with searching within a form. We want to be able to perform a search in a form by clicking on a button within the form rather than using a query or filter, and we want the results to be displayed within the form in the available fields.

Many thanks!

View 1 Replies View Related

Searching For Records Using A Form.

Apr 21, 2008

I have a form I am using to search for records based on any number of criteria. The one I am having a problem with is a model number search. I would like to search based on a from value and a to value.......for instance........let's say you had the following items:

bird
birth
bill
birdbath
bite
bitter

If I want to search for values from bir to birt, I would get bird, birdbath and birth. How can I code my query value to look for values between two text boxes in a form?

View 1 Replies View Related

Searching Table With Form

Feb 23, 2005

I have a parent table called patient info. and a child table called fills. The database in the future will become very large, and will be difficult to find a particular patient in the parent table to update fills in the child table. How can I search through the parent table using a form for easy access to a particular patient so that I can update fills?
Thanks for those who help!

View 1 Replies View Related

Forms :: Searching On A Form

Jan 4, 2015

I have a table containing customer details and a form which allows you to view them like records.how i could make something that enables me to search their fullname that would take me straight to that record.

View 2 Replies View Related

Query - Searching For A Word

Jan 28, 2005

Hi, i am designing a database but i need to do a query which will search for a specific word and bring up all the details regarding this this. An example is i need to search for the drug panacur to see which animal use this treatment, i then want it to bring the name and address oof the client as well as any other details. I just do not know how to search for a specific word. please help!!
Thanks

View 6 Replies View Related

Searching Particular Record To Edit In Form

Jul 19, 2005

I have a form that assigns an Auto Reference Number to each record. Now the records are later edited. Is there a way that I can have the user enter the Reference number and come directly to that particular record that needs to be changed in the form. Like a dialog box that asks Enter Reference Number or something.

View 2 Replies View Related

Using Asterix In Form For Searching Records

Mar 30, 2006

Hello All

I've been looking and abusing the search function on this forum for this particular obstacle but no luck.

The client im building a database for wants a search form and everyone who used the old system are used by using *'s in their search criteria.
I know how I can use *'s in queries but its fixed (I think).
I want to let the end user use * when they want to pin down a particular product. So they just type in a part of a word and use a * at the end, middle or before.

Or should I just abandon the idea of using them in input form controls?
I know this works because I have seen it before, too bad I had no access to the source of it.

I hope someone comes up with some ideas, pointers or howto's

Thank you guys in advance

View 1 Replies View Related

Problem With Searching In Form! Urgent!

Sep 8, 2006

Hi everyone, i'm new from here!

i'm doing one of my school project, but i got a big problem with this.

from the photo, i've created a form like this. and i want to have a search system, searching data from table. so i've created 2 input box with 2 different searching methods.

both methods work the same. type in the Stuff ID and then click the search, datas will show like this.

but the problem is, i can't get the Search button working, whenever i press the search, it said that the Stuff ID can not be found. but i've that stuff id in my table!

Could anyone show me a solution of this. or is this method good? coz i'm not doing that with the VBA!

PS... sorry for chinese words. coz i'm from hong kong!

View 2 Replies View Related

Queries :: Searching Between Dates From Form

Feb 4, 2015

I have a query and need it to filter between to dates that are entered into a form.

The dates are long date fields (dd/dd/dd hh/mm/ss)

I've used the following search criteria

Between #" & [forms]![frmSearch]![txtTimefrom] & "# And #" & [forms]![frmSearch]![txtTimeTo] & "#

But clearly I am missing something because when I go and save the query it comes up with the following error "the expression you entered has an invalid date value".

Been trying loads of different expressions but nothing seem to work.

View 2 Replies View Related

General :: Searching Form With A Subform

Aug 27, 2013

I would like to filter a table with 3 fields: Name, Surname, and Chart number.I would like to have the results in a subform designed in the same form.In fact every patient can have several admisions (1, 2 or more).I have arranged the main form named men with 3 text unbound box (name, surname, CCN) and 2 button clear and run the query.I have created a query .The problem is that when i push the button the SQL starts and a different window is opened. I would like that when you type the name for example in real time the subform should select the record with that criteria. Moreover I would like that when in the subform appears the records with the criteria the users could click on the selected record to open a different form.

View 3 Replies View Related

Searching For Multiple Terms In Query.

Feb 1, 2006

OK - I'm kinda new to all this stuff (as you're about to find out from my question).

I've got a page with a search form, where visitors enter a search term. That page uses GET to pass the variable to the results page. The SQL on the results page is pretty simple, it just takes the variable from the URL and filters for records:

WHERE columnname CONTAINS
Request.QueryString("passedvariable")

So that all works fine - except that it does not allow for complex searches. If someone searches for 'fish' then that works fine. If someone searches for 'fish and food' then the search looks for "fish and food" somewhere in the record, rather than looking for both of those terms in a record.

Now, I'm guessing that there's no simple solution for who to get this to work, but I'm hoping that someone can help me out and at least point me in the right direction. I'd be happy to post additional code if you need it - but I don't even know what else to post!

Thanks in advance.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved