Queries :: Phone Book Database - Query For Fields Containing A Value
Sep 5, 2013
I'm currently trying to make a simple phone book database that use queries to search through the records. I need to set the search parameters to pick up all records containing a value rather that just search for that specific value.
For instance if I type in "mic" and search I want all records containing mic to appear in results like mick and Michael.
Is there any way this can be done?
So far I have only tried the [please enter first name] method and this has been in successful.
In Acess 97 I have a single data base with 5 tables, Attorneys, Employers, Health Care Professionals and two others. All tables have exactly the same fields.
I am trying to create a “phone book” made up of all the records in the data base. The form for this phone book has only a few fields such as fname, lname, phone, address. It also has the autonumber field. The record source for the form is a Union Query. When I open the form it works well. I get lawyers, employers, doctors , etc. all in alphabetical order.
Here is my problem:
I have a command button labeled “View Record.” I want to be able to click on this and have it find the record in its original table and open the form for that table so the record can be modified (on exiting the record I have it requery so the phone book is updated).
I can only get this to work with one table at a time, that is, the table that is named in the event procedure code. So if I am in, say, an Attorney record and tblAttoney is named in the event procedure code, all works well. But if I am in, say, an Employer record I get a blank Attorney form opened.
How can I get it to trace the autonumber to the proper table and open the record . I assume that the autonumbers are unique ACROSS all five tables since they are in the same database.
My question is simple: I've got a database of my book collection. If i view it in a style sheet, it is something like
Author Title etc.
A 0 C 1 B 3 F 2 D 5 D 4 A 8 F 9
I would like to order the Author and Title columns (permanently). Particularly, I would like to order in alphabetical order all the authors and, if I've got the same author, order his/her book alphabetically, something like:
I have a list of 500 PDA users, spread over 7 offices. I want to keep an eye on what happens with the devices and their SIM-cards. As they are often swapped between offices and SIM-cards get lost. I am pretty sure that I don't have to re-invent the wheel. Do you have any idea of a free/shareware tracking tool for PDA's and cell phones ?
the phone rings.. the phone is connected to the computer.. the incoming caller's phone number is sent to the database.. and then possibly used in some way..(eg in a query or displayed on the screen in the database)
anyone had any experience in this process or can recommend a phone/cable setup url...
I have the following VBA code to search for a string
Code: 'Search by Phone Private Sub CmdSearchPhones_Click() Me.Refresh strSQL = "SELECT Tbl_Contacts.ContactID, Tbl_Contacts.FName, Tbl_Contacts.LName, Tbl_Contacts.Address, Tbl_Contacts.City, Tbl_Contacts.State, Tbl_Contacts.Zip, Tbl_Contacts.HomePhone, Tbl_Contacts.WorkPhone,
[Code] .....
My issue is that this works 50/50, because phone numbers on the database are NOW being stored in this format (000) 000-0000 and previous DB phone numbers got stored as 0000000000. The above code finds previous DB phone numbers (even if we dont enter all 10 digits) without a problem but has issues with new phone numbers stored in the new format UNLESS I specify the search with (000) 000-0000 (but we want to be able to search without adding that and without typing all 10 digits - in case we forget part of the number we are looking for)
How can I tell my query to find both formats, with the (000) 000-0000 AND 0000000000 ....
Hello !:) I need to make a SQL query in Microsoft Access. The database is in French but you will easily understand, if not please ask me to translate. You will find the MDB Access file inside the attached ZIP file.
The query I need to make is ::rolleyes:
We want for the next sent of books to the members of l’EST-SUD (WEST-SOUTH in English), to test the equivalences of the books.
We want to send for each book from the “genre” (theme in English) “Animaux” the most expensive equivalent book, we want to give a list with the original book, the recommended price (PrixCons in the database) and the most expensive equivalent book with his price.
-“NoLiv” is the book number in the database. -“TitreLiv” is the book name (title) in the database. -“NoGen” is the theme (genre) number in the database. -“NomGen” is the theme (genre) name in the database. -“PrixCons” is the recommended price for the book.
This is the query I tried, but it isn’t working ::confused:
SELECT DISTINCT * FROM LIVRE AS L, EQUIVALENCE AS E WHERE L.NoGen IN (SELECT G.NoGen FROM GENRE AS G WHERE G.NomGen IN ("ANIMAUX")) AND E.NoLivEq IN (SELECT LI.NoLiv FROM LIVRE AS LI WHERE LI.NoLiv IN (SELECT MAX(LIV.PrixCons) AS [Prix Max Livre Equivalent] FROM LIVRE AS LIV WHERE LIV.NoLiv=LI.NoLiv)) ORDER BY 2, 3;
SECTEUR (N°Sec, NomSec) ADHERENT (NoAdh, NomAdh, PrenomAdh, Sexe, DateNaissance, #N°AdhResp, #N°Sec) MEMBRE (NoMemb, PrenomMemb, Sexe, Age, #N°Adh) GENRE (NoGen, NomGen, Exemples) LIVRE (NoLiv, TitreLiv, ThemeLiv, PrixCons, #NoGenre) ENVOI (#NoMem, #NoLiv, DateEnvoi) ETUDE (#NoMem, #NoLiv, DateEtude, EvalEt, Commentaire) EQUIVALENCE (#NoLiv, # NoLivEq) Primary keys are underlined and foreign keys have a # before them
My colleague has a multiple table database and uses lookups for some fields. The simple query was to extract 3 fields and display all records from those fields. The result of the query was that the selected fields were listed first followed by all other fields which are usually not displayed.
I am hoping to do a report all my queries in my Database.
I have managed to use some sql code to list the queries which is the following:
SELECT MSYSOBJECTS.Name FROM MSYSOBJECTS WHERE (((MSYSOBJECTS.Type)=5) AND ((Left([NAME],1))<>"~"));
But i cant seem to get any further i would also like to include the creation date, the description if any, the tables associated with each query, as i know i have a good few queries which maybe duplicates i just want to clean it up.
and what i need to is something that will link all sku 1 category names in a new field with a | divider and then all the sku 2 category names together with | as a divider and so on. the amount of categories is different for every sku.
And if this is easy enough, its not that important though but to delete duplicate category names when it transfers them across to a new field joined together.
I want to Compare the results in a single query. However the amounts aren't correct and after a full day I cannot find the answer.
Code: SELECT [Budget].Month AS [MONTH], [Budget].[Organization Code], [Budget].Account, Sum([Budget].AMOUNT) AS [Budget Amount], Sum([Actuals].AMOUNT) AS [Actuals Amount] FROM [Budget], [Actuals] GROUP BY [Budget].Month, [Budget].[Organization Code], [Budget].Account, [Budget].SubAccount HAVING ((([Budget].SubAccount)="K08"));
I have a table containing the area, location and name of someone there is also a field contains a number from 0-10. I need to run a query that will count the number of times a number appears in this field and put this total in a field on its own.
I have a query that is used to capture all the fields that can be possibly used.When run & exported to excel the user then simply deletes the columns with the fields that they don't require.We do this so we don't have to keep creating queries over and over again when you just use one that does all but then delete what you don't need afterwards.
Any way of using a form with tick boxes for each of these fields so when they user ticks the fields they require reporting on then only those fields will be returned in the query.
I have a query that selects different values from different tables.The values of these fields change all the time and I would like the result of my query to exclude - hide the fields that are zero. However, I only want to hide the specific zero fields not the hole record.Non zero fields should still be visible.
I know how to concatenate fields in a query but have not done it with memos before. I have three memo fields and I want each to show up in one field with a bullet in front of each. Memo1 may be empty and memo2 and memo3 may have something or memo 3 may have some text but the others are empty so I need to be able to list the memos without the empty spaces. Is a query the best place to do this or in the report and how do I do it?
I have a query that is based on three queries. 2 of those queries have the same fields but return data for different dates. The 3rd query returns the dates needed. In other words, I am trying to return all results from both queries. these are the results I want:
Report_ID Report_Date Contents Approvers Standard ops 5/1/13 daily operations rpt tom tomlin royer manuf 7/1/13 syndication rpt rob davis
etc.
These are for year-t0-date. there is a YTD query that returns all dates needed. The other two queries return records on different dates, on is for dates <5/5/13 and the other is for dates >5/4/13. I have listed the SQL below. It returns the correct records, but for the Record_ID it returns -1 in each field instead of the report_ID text. So, I need to get the other fields to show up correctly.
Code: SELECT [Daily_rpts_YTD_due_before_5_5_2013]![Report_ID] Or [Daily_rpts_YTD_due_after_5_4_2013]![Report_ID] AS [Report ID], due_dates_Daily_YTD.Due_dates FROM (due_dates_Daily_YTD LEFT JOIN Daily_rpts_YTD_due_before_5_5_2013 ON due_dates_Daily_YTD.Due_dates = Daily_rpts_YTD_due_before_5_5_2013.Due_dates) LEFT JOIN Daily_rpts_YTD_due_after_5_4_2013 ON due_dates_Daily_YTD.Due_dates = Daily_rpts_YTD_due_after_5_4_2013.Due_dates WHERE (((due_dates_Daily_YTD.Due_dates)=[Daily_rpts_YTD_due_after_5_4_2013]![Due_dates] Or (due_dates_Daily_YTD.Due_dates)=[Daily_rpts_YTD_due_before_5_5_2013]![Due_dates]));
I allready looked at what was recommended in this forum - but I noticed there are only two books listed.
Are both of these books good for beginners or is the Access 97 Bible better? I have seen about a dozen of books and would like to have a few on hand to learn from and to reference as my skills increase.
I truly am after something that can give me a breakdown of the code in Access and what each line really means and the action it produces.