Results 1 to 8 of 8
  1. #1
    Spark is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Sep 2011
    Posts
    5

    How to make Search forms


    I am looking onto creating a database which is basically a search form for my company. I have 3 major questions and would be glad if someone could help since I am not at all familiar with access. I have managed to make the tables and a form to view all the clients and their data but my problem is with the search part of it:
    - First I don’t know how to make a search-form, so should I make a query form or should I use a blank form to create it. Also I tried making the search on the form directly, which was obviously unsuccessful, since I don’t know if I should try using the SQL, macro or the code builder.
    - Second, I know how to do the single search on queries but my problem is with multiple searches from the same field. I want to run a search based on the location of my client. So I have this column which has name of different countries, and usually 1 client can have more than 1 country listed, if they have subsidiaries. I want to create a search engine where I am able to select in any country/countries and any client in the database that are based in those countries to appear. So the condition is: Search for ‘client location’ in the ‘Client information’ table, where the location is ‘xyz’ or ‘abc’ or ‘def’ or…
    - Third how do I make a form appear the first thing as soon as I open my access, like an opening page?

    Thanks

  2. #2
    alansidman's Avatar
    alansidman is offline Indifferent
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,536

  3. #3
    cap.zadi is offline Competent Performer
    Windows XP Access 2007
    Join Date
    May 2011
    Location
    KSA
    Posts
    481
    hey there, thanks for those links and working fantastic. would u help me to know that if the same procedure can apply to the combobox to select the names from combo box?

    please advise.

    thanks

    zee

  4. #4
    alansidman's Avatar
    alansidman is offline Indifferent
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,536
    Convert the text box to a combo box and use the same set up in your query.

    Alan

  5. #5
    Spark is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Sep 2011
    Posts
    5
    HEy..
    Thanks for the videos...the second one worked great for me...as for the main search form..well I am unable to make the 'Indexed' as duplicates OK since as i mentioned before the location field has multiple values...when i run the search macro the result it keeps giving me is my first client with that location and the other search criteria does not work at all..i guess it is because I am unable to change the format of the Indexed. Could you please help me out with that.

    Thanks In Advance

  6. #6
    alansidman's Avatar
    alansidman is offline Indifferent
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,536
    Suggest you try using the IN predicate in your query. In the criteria, type
    In ("abc", "def") to find either abc or def.

    Alan

  7. #7
    Spark is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Sep 2011
    Posts
    5
    So I am using the 'Area' and 'sector' as the search criteria, for the Area lets say I want to search for clients who are in 'N America' and 'GCC' and for the sector i want to search for 'energy' and 'agriculture', how should I do that. Like having multiple search at the same time from the same field with two criterias? So basically I want to perform multiple seach from two different fields.
    So previously in my query the Sector had this criteria like the one the video showed: Like [Forms]![Search Form Display].[qsector1] & "*" and Like [Forms]![Search Form Display].[qarea1] & "*", How do I place the In command with this? Also then in the form I will have to do something such where I can enter two criterias in one field such as 'N America' and 'GCC'?
    Thanks

  8. #8
    alansidman's Avatar
    alansidman is offline Indifferent
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,536
    I have not done this, but thinking out loud I would:
    1. Change combo boxes to a list boxes with your criteria options
    2. Change your criteria on your query to IN(Forms![Search Form Display].qsector1) and to IN(Forms![Search Form Display].area1) for each of the fields.

    This is untested but does seem logical to me. Let me know how and if it works for you.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 12
    Last Post: 06-08-2012, 02:37 AM
  2. Changing Forms with Search
    By Zerdan in forum Forms
    Replies: 1
    Last Post: 05-31-2011, 10:03 AM
  3. Search forms and sub forms
    By FadingAPE in forum Forms
    Replies: 1
    Last Post: 12-15-2010, 01:59 PM
  4. how do i make forms not resizable?
    By RedGoneWILD in forum Programming
    Replies: 2
    Last Post: 08-05-2010, 01:11 PM
  5. Search function in forms
    By vCallNSPF in forum Forms
    Replies: 1
    Last Post: 03-14-2010, 06:17 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums