Searching For Multiple Data

Jul 10, 2007

Hi,
I currently have an employee database - all info is currently in one table.
I am wanting to create a search box in my form which allows me to search for multiple bits of information. ie. I would like to be able to type in either a first name, surname, full name, or employee id number (for example), press enter, and for it to display the results (either by going to the first that it finds, and me then clicking find next, or by displaying all found in an index so that you double click the one that you want - i am not too fussed... the main issue is getting the search box to look in multiple fields).

I currently have the following code:

Private Sub cmdFind_Click()

DoCmd.ShowAllRecords
DoCmd.GoToControl ("Surname")
DoCmd.FindRecord Me!txtIDFind
'If FindRecord = True Then
'Exit Sub
'End If
DoCmd.GoToControl ("EIN")
DoCmd.FindRecord Me!txtIDFind
'If FindRecord = True Then
'Exit Sub
'End If
DoCmd.GoToControl ("forename")
DoCmd.FindRecord Me!txtIDFind

End Sub

(ignore the notes - they were trial and error for something else).

Currently, when i press find, this code will find the first of anything - ie i time in Frank and the first Frank will appear (unless someones surname begins with Frank). What i can't seem to do is get it to progress to the next record if i press a find next button.

I have also tried the following code, but it only works if i put in an EIN number:

Private Sub Findall_Click()

DoCmd.ShowAllRecords
DoCmd.GoToControl ("ein")
DoCmd.FindRecord Me!txtIDFind, acStart, acAll, True


Any thoughts? I think i'm probably looking at this in completely the wrong way.

Oh, also i am quite new to VB, so please forgive any silly questions that i am likely to ask!

Kind regards,

Fergus.

View Replies


ADVERTISEMENT

Searching Using Multiple Criteria

Feb 23, 2005

I have a button with this code attached

Dim SearchStr2 As String
SearchStr = "[PROTECHNIC_NUMBER] = " & "'" & Forms![FRMPATIENT]![Frm_ICP_Select].Form![Protechnic_Number] & "'" _
And "[ICP_Code]" = Forms![FRMPATIENT]![Frm_ICP_Select].Form![ICP_Code]
DoCmd.OpenForm "FRMASSESMENTHEAD", acNormal
Forms!FRMASSESMENTHEAD.Filter = SearchStr
Forms!FRMASSESMENTHEAD.FilterOn = True

If the button is clicked it should open the FRMASSESMENTHEAD form where the Protechnic Number (which is a text field) and the ICP Code(which is numeric) is the same as the ones on the current subform.

It works great if just using one of the criteria but when i put the and command in and then add the second criteria i get an erroer message saying

Run-time error '13':

Type mismatch

hope this makes sense and can anyone help :confused:

View 1 Replies View Related

Please Help:Searching Multiple Tables!

Jan 3, 2005

Is there a way to search multiple tables for a record. I have 4 tables, each containing a different product. In each table are lists of serial numbers (primary key) and other information (ship_to, sales_order_number,etc.) for the product. I want to be able to enter a serial number and display the information related to that serial number. Not all fields are the same for each table. Is this possible? I would greatly appreciate any help!!

View 1 Replies View Related

Searching Multiple Tables...

Jan 25, 2008

Ok folks I have what is proving to be a doozy for me.

I have a multiple table database related fields in each one are:
Procedure
Description
Payable Amount

I am trying to find a way to search particular tables for particular Procedures. My output must include fields: Procedure, Description, Payable Amount. I have tried a form but I would have to included way too many text boxes to accompish what I am looking for. If possible I would like to have three text boxes if a form is possible. I would start the search and my output would end up in the text boxes below:
Procedure, Description, Payable Amount

With of course some sort of Identifier of the table that was selected to search in.


Can anyone help me?


Sean

View 5 Replies View Related

Searching Across Multiple Tables With Same Columns....

Dec 2, 2005

Ok,

I have three tables that are named different, but have the same column names, but different data in them. The data in each table is linked by a master table that has a primary key.


What I need is a way to make a form with a box where I can search on a value that could be in any of the three tables and then the associted information from the site will display in the above boxes.


(Site Master Table contains all site information and the primary key)
(The three tables are sales order information. Stage Only table, Install table, and srop ship table)

Any ideas?

View 1 Replies View Related

Searching On Multiple Criteria Problem

Sep 19, 2007

i have created a form for my database where i intend to give the user the option of searhing my more than one criteria but not all.
i have used a system of combo boxes for the user to enter thier choises leaving the combobox blank for any criteria they dont know.
the user then clicks th button to open the query

in the query i have set the criteria for the fields to equall the related combo bo in the form.

however if the comboboy is left blank (0 or null) the query looks for a record where that field is also null. as a result it wont return any records.

an example

on the table tblFault there is the record

FaultID; 7
Computer id; 2
Name; c
Room-ID; it1
Date Of Fault; 05/06/07

on the form the user enters the following values into the combobox

FaultID; 7
ComputerID;
Nme; c
Room-ID; it1
Date of Fault 05/06/07

the query returns no records insead of the record above.
this is because it is looking for a record in the table where the Computer-ID field contains a null value.

is ther a way to ignore the chriteria if the combobox contains a null value????

i have tried to use vb to convert all null values to be "Like "*"" but it keeps returning a type missmatch error but still changes to combo box value to ; Like .

View 6 Replies View Related

Searching For Record By Multiple Fields

Sep 9, 2006

Hi,

Not sure where to put this, but as I want the information to be shown in form view, I guess this is the bext place to start.

In breif, I have created a database, in which infomation on machinery is held.

The problem I am having (atm), is I have to create a function, which I want to be presented in form form, where by each item can be searched by it's RequestID (unique) or the customer who owns it, so that its current location can be attached (or viewed).

I'm not sure whether i've worded this well, so to sumerise:

I need a form with 3 fields, RequestID, Customer and Location.

Where by I input the RequestID, which brings up the Customer and Location, or input Customer which brings up the RequestID and Location (obviously there will be mulitple results from Customer search).

Again, I hope I haven't confused anyone because it's pretty simple what i'm trying to say, but....

Thanks, Ben

View 1 Replies View Related

Searching For A Persons Name Which Gives Multiple Answers

Jan 31, 2006

Please help me !

I am in the process of creating a database in access to search for a persons name. However, the results will give many ansers. For example if I search for the srname 'jones' I get many names. I eed then to be able to select one of these jones's with the information relavent information.

It has many years since I have done this although i did have quite a good knowledge at the time. Plesae can you make any suggestions and answers as basic as possible !

Many thanks in advance http://forums.aspfree.com/newthread.php?do=newthread&f=18#
Mad

View 7 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

Searching For Certain Field Name From Multiple Tables

Dec 22, 2011

I have around twenty shipment tables for different days and one main store check table.In the shipment tables i have bill numbers that correspond with shipping id's and in the store table i only have bill numbers.

I would like to check if the bill number in the store table appears in all 20 tables.after doing that i want the corresponding shipping ID to appear in the store table. Is this possible?

View 5 Replies View Related

Show Multiple Fields As One, For Searching Purposes.

Dec 8, 2006

Hello everyone,

Im trying to set up a combobox on my Customer Contact Information form, where you can enter a phone/fax/cell/pager or any misc number, and it will bring up the appropriate customer.

Is it possible to make a query that will show the different phone number fields as one field?

Thank you so much for your help, and please let me know if I can clarify anything.

-Ben Bolduc

View 3 Replies View Related

Modules & VBA :: Searching For Record Using Multiple Criteria

Aug 2, 2013

I have a form where a user enters data. One of the things the user enters is a "lot size". I need this lot size field to be checked against a query in the database to determine if the quantity is acceptable or not.

The order number in this query is in certain cases missing a leading zero, so I need to truncate this from the user entered form field.Finally I want the user to be notified if they are trying to exceed the lot size in the query.My code is as follows:

Code:
Public Function RemoveFirstChar(RemFstChar As String) As String
Dim TempString As String
TempString = RemFstChar
If Left(RemFstChar, 1) = "0" Then
If Len(RemFstChar) > 1 Then
TempString = Right(RemFstChar, Len(RemFstChar) - 1)
End If
End If

[code]....

View 14 Replies View Related

Query Searching Multiple Tables' Field Names (not Values)

Jan 22, 2007

Hi. Please do not lecture me on database normalization, as this truly is not in my control.

I have 2 dozen tables, each with 13 fields. All of the field names exist in at least 12 of the tables. And all tables share a ssn field where values are common.(Confused yet? Sorry, if you are...)

If I design a query showing all 2 dozen tables and their fields...
Can I set up a query criteria where I enter the requested ssn and then the required field name and have the result show the values of all the fields with that name, among the ones of the 2 dozen tables where that field name exists? (for that specified ssn)

If I am only as clear as mud, please let me know, and I will try again.
Or, by asking if I can search for field values querying by field name, am I any clearer?

Russ

View 14 Replies View Related

Searching For Data In Yes/No Boxes

Aug 10, 2006

Hi,
Can you help me? I am very new to using MS Acess and have just built a very basic DB to store enquiries coming in to Head Office from potential franchisees.
Within this DB I have included a "Yes/No" box with a Title of Live Franchisee.
When an enquiry becomes a franchisee I tick the box as yes.
My question is how do I search for all the "Yes's" so that I can display all the live franchisees.

Best Regards
Keith :(

View 3 Replies View Related

Forms - Searching Data

Oct 18, 2005

Database description

I have one to many relationships between tables related with PersonID. From the entry forms I enter data and there is another form to search data. The data search form displays some 5 fields from different tables: first name, last name, phone, email...

Problem description
When I enter new data in all the above named fields, then the search engine can find and display the new record. However, when I leave blank some of the fields, let's say, the phone field, then the search does not display the entire row, although the first and last name, for example, exist in the appropriate table.

I would appreciate, if anyone could help me to solve the problem.

Thanks

View 1 Replies View Related

Searching A Field For Specific Data

Jun 14, 2006

Hello everyone,

Ive designed a databse - no problem. Ive done all queries I need to - no problem. Ive designed forms for entering data and reports for showing data - no problem. THE ONE PROBLEM I have is with 1 field.

The problem is that the field is a memo box, used to add data on groups attended. For example: General, customer care, mystery shopping.

Can I run a query so that a different user can search the memo box for attendence to a certain group? eg, search this databse and field for customer care.

At the moment I can only seach on the first word in the field. I dont really want to have seperate fields as each employee can have attendence to different groups ie bo can have just general while bill has general, mystery shopping, customer care etc.

Any help would be great

View 6 Replies View Related

Forms :: Searching Data Using Combo Box On MS Access 2007

Aug 31, 2014

I am new to MS Access database and I am currently developing a DB with search function in a form for an inventory purpose, I have followed some VB codes from the web.

Here is my issue; when I try to search using the configured combo box in the form it gives me these sets of values, here is the screenie //oi57.tinypic.com/24fxwzk.jpg (just add the http: before the forward slashes as the site wont allow me to post images or links yet)

Row source for data: "-1";"Office 2010";0;"Office 2007";1;"Visio 2010";2;"Visio 2007";3;"Project 2010";4;"Project 2007"

and here is the VB code:

If Not IsNull(Me.compName2) Then
strWhere = strWhere & "([Computer Name] Like ""*" & Me.compName2 & "*"") AND "
End If
If Not IsNull(Me.cUser2) Then
strWhere = strWhere & "([Current User] Like ""*" & Me.cUser2 & "*"") AND "

[Code] ...

I just wanted to eliminate the numbers and replace them with the actual values as name. ex. "-1";"Office 2010" instead of (-1) doing the search, it should be the value "Office 2010"

View 6 Replies View Related

Question About Searching For One Date Accross Multiple Date Fields. Thanks!

Jan 12, 2007

I am currently building a booking and invoicing database for the small business where I work. One aspect of this database allows you to enter an employee name and schedule days off via a form I have already built. To access this information I would like a parameter query where you can enter a date once and then have this date looked up across a number of date fields. Here are my table column headings:

ID
Employee Name
Date 1
Date 2
Date 3
Date 4
Date 5
Date 6
Date 7
....etc

So, basically, the parameter query would ask "What date?" which the person would enter, and then search all 12 date fields to see if the date was contained in any one of them. Then it would pull any records which did have the date in one of the fields.

It seems really simple but I have searched and searched and can't seem to find the answer. Tried a multivalue field but does not seem to work.

Thanks very much, any help appreciated! Elspeth :confused:

View 14 Replies View Related

Import Excel Data From Multiple Sheets Into Multiple Tables In Access

Aug 25, 2012

I would like to know which way is the best way to import excel data from multiple sheets in to multiple tables in access.

For example data from Sheet1 -> Table1, Sheet2->Table2, Sheet3->Table3 etc...

I have tried using this:
Cmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel5, "Table1", "C:Importedfile.xlsx", True, "Sheet1!"

Ironically, data from Sheet2 and Sheet3 seem to be properly imported in to table2 and table3, but some of the data from Sheet1 seems to be missing in Table1 after import.

Any other ways to import the data?

View 1 Replies View Related

IMPORTING MULTIPLE FIELDS FROM MULTIPLE DATA SETS INTO A TABLE

Nov 16, 2006

I HAVE A DATASETS cSV TEXT FORMAT WHICH HAS A SELECTION OF FIELDS THAT NEED TO BE IMPORTED INTO A TABLE. USING THE ADVANCED IMPORT FACILLITY I HAVE BEEN UNABLE TO IMPORT THE DATA PLEASE HELP AS THIS IS FOR MY A-LEVEL STUDENTS.


THE FIELDS REQUIRED IN THE SESSION TABLE ARE,
Booking ID, Customer ID, Date Booking Made, Pickup Point, Payment Made

The CSV data set attached

tHANK YOU

SIMON

View 2 Replies View Related

Multiple Data Entry Clerks Inputting Data

Mar 5, 2008

I have a shared db where there is a requirement for more than 1 user to enter data in the same form and hence the same table. Up till now there has only been 1 data entry clerk so there has not been a problem.

Would accessing the same form by different users cause a problem, assumming they are inputting different records?

View 9 Replies View Related

Multiple Years Data

Aug 22, 2005

Need some help figuring out the best way to handle this.
I have one table - tblEngineVolumes which has columns for each month Jan-Dec for the year 2005 with fields for each printer type.

Type Jan Feb Mar.....
PrinterA 100 50 300
PrinterB 500 25 250

I now have to figure out a way to have both 2005 and 2006 volumes for each printer.

My option so far is are below (there will never be any more than 2 years involved)

Type Jan 05 Jan 06 Feb 05 Feb 06
PrinterA 100 150 50 60
PrinterB 500 400 25 35

OR

Type Year Jan Feb
PrinterA 2005 100 50
PrinterA 2006 150 60
PrinterB 2005 500 25
PrinterB 2006 400 35

Would appreciate any thoughts/suggestions

Thanks,

Toni

View 2 Replies View Related

Data From Multiple Tables

Jul 22, 2005

Hi All,

I have designed a form that holds data from a table called Purchase, it also has got 3 more fields that are coming from another table called Master. These 3 fields, Code No, PartNo and Description are same in both tables. All i need is a way to bring the data of the stock table on purchase form. As soon as i enter code number in code field, it should check in stock table if the same code exist, if yes then it should bring the all 3 fields in purchase form and display.

Hope someone out there will return my call.

Warm Regards,


Darno

View 1 Replies View Related

Multiple Entries With Different Data

Nov 21, 2005

i have a report that displays 12 fields of date sorted by a case number. I have a problem when there are two or more entries in the db with the same case number, but different data in the other 11 fields. My report displays each of entries in the db for the case number, but carrys the the data from the first of those entries through out all the entries. I'm not looking for an exact solution here, just for someone to get me pointed in the right direction. Is it a sorting and grouping error or something of like?

View 1 Replies View Related

Multiple Levels Of Data

Jan 14, 2008

I'm fairly new to access, having done a lot of what would have been easier with access in excel. I've decided to make the switch but need one particular thing that I can't seem to work out.

I have a series of "Courses" which contain a series of "modules" and each module has various amounts of data that needs to be accessed.

Is it possible to have module tables embedded in the courses table. Or, do I have to just have one massive table that contains ALL the modules with a field that says what course they belong to. Then make queries that display only the modules of that course? Or is there another way to do it?

I also haven't gotten to learning about queries yet, so if this is the way to do, can anyone explain how or better yet, point to a tutorial that can explain how this is done?

View 6 Replies View Related

Searching

Jun 25, 2007

Hi, I have two questions which i dont think are two far apart, hence same thread.

First is, how do i make a search text box, that when i click a button searches for what is in that text box, rather than bringing up the find box. It is alright but it always compares it to what was last tabbed, or is the selected tab, and i want it always to compare to another textbox called company name.

secondly. I am often entering entries to the database with the same details. but a different name, how can i have it so that i enter say 4 or 5 names which starts 4 or 5 new records, but then places the rest of the details across all the new records.

THANKS
aLEX

View 2 Replies View Related







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