Page 1 of 3 123 LastLast
Results 1 to 15 of 36
  1. #1
    maxx3 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    May 2009
    Location
    Mosta Malta
    Posts
    32

    query problem

    Hi friends I'm new on this forum and with access and I have a problem with queries I made two tables one with names and index numbers and another one with the same name and and other staff like places,dates and so on now my problem is that after I go to queries then design view and there is every thing there now under Criteria I wrote Like"*"&[Enter firstname or any part of name]&"*" so that I won't have to wriet the whole name every timeand that woks fine now the hthing is that I wish that besides wirting name I wish I could enter the index number and have the same result I explain when I write Jo the program can find John that's no problem it works fine but John has an index numder of let's say 34 can I in the query box write 34 and the answer is John if yes can anyone the me how it should be writen instead of this Like"*"&[Enter firstname or any part of name]&"*" Thank a lot and sorry for writing so long I hope it could be understood Regards Maxx3

  2. #2
    CraigDolphin is offline Competent Performer
    Windows XP Access 2000
    Join Date
    Apr 2009
    Location
    Custer, WA, USA
    Posts
    125
    In the query builder use the same expression as the criteria in the Index field as well, except put it one row below the row containing the criteria expression for the name field.

    Then you should be able to type in the name, or the index number at the prompt, and then the query should reutrn any record that match the name field criteria OR the index field criteria.

  3. #3
    maxx3 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    May 2009
    Location
    Mosta Malta
    Posts
    32
    First of all thanks for your interest but Ididn't quit understand what you said this is what I tried in criteria I wrote this Like "*" & [Enter notary name or any part of name ] & "*" And right under it where there is or I wrote Like "*" & [Enter index number]&"*" but when I save two boxes are emerging first with name and the other one with index number but it won't work if it is not this what you meant can you please be more specific and write the phrase to me thanks I really appriciate if you do regards maxx3

  4. #4
    maxx3 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    May 2009
    Location
    Mosta Malta
    Posts
    32
    hi now I tried as I think you said but I still have a problem that is I have to write the name or index number two times when iopen the query and write let's say a name or an index number and click ok a scond box uppear and Ihave to write the same name or index number could it be that there will be one query box with two query parts let's if you are going to enter a name it will be on top and if you are to enter an index number it will be under it could you please help thanks

  5. #5
    CraigDolphin is offline Competent Performer
    Windows XP Access 2000
    Join Date
    Apr 2009
    Location
    Custer, WA, USA
    Posts
    125
    I think you misunderstood slightly.

    In the first field in your query put the criteria expression in the usual place.
    Then put exactly the same expression in the criteria area for your next field, but one row lower. It should not be directly below the other expression: it should be one row down but in a different field altogether.

    You need to be sure that the criteria expression is identical in both fields or else you'll get more than one prompt.

    Hope that clarifies matters

  6. #6
    maxx3 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    May 2009
    Location
    Mosta Malta
    Posts
    32
    Hi really thank you for your help it worked just fine like that at first I changed the criteria refering to index number Ididn't know I had to leave the same criteria under index number thank you very much you where really helpfull thanks

  7. #7
    maxx3 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    May 2009
    Location
    Mosta Malta
    Posts
    32
    I don't now if I'm going to be importunate but I very getting more interested in this and if you don't mind I wish to ask you one more question as it is the program works just fine but if I say I had to go one step further and try to find from the database say all the volumes belonging to john in 1990 can this be possible that right now in the query box I write apart of say John name or his index number and yhe result is all the volumes he has is it possible the in the query I will also select a certain year thanks again for your help right now I'm very glad with the results thanks to you

  8. #8
    CraigDolphin is offline Competent Performer
    Windows XP Access 2000
    Join Date
    Apr 2009
    Location
    Custer, WA, USA
    Posts
    125
    It is difficult to answer this without a full understanding of what your data and table looks like. Assuming you have a third field that contains the year, you could create a second prompt in that criteria field to further refine your results. This new criteria would be on both rows where you already have a criteria expression but in the third field.

    Essentially, when you have two criteria expressions on the same row you are saying
    X AND Y
    If you have two criteria expressions on separate rows you are saying
    X OR Y

    In your case, the logic that you would want would be:

    (X AND Y) OR (Z AND Y)

    With X and Z being the first prompt in the two different fields, and Y being the new/year prompt in the third field.

  9. #9
    maxx3 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    May 2009
    Location
    Mosta Malta
    Posts
    32
    I going to try to upload my database if you don't mind because I didn' quite under stand you thanks

  10. #10
    maxx3 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    May 2009
    Location
    Mosta Malta
    Posts
    32
    This is my database only on the first three names there is some data because my just trying first

  11. #11
    CraigDolphin is offline Competent Performer
    Windows XP Access 2000
    Join Date
    Apr 2009
    Location
    Custer, WA, USA
    Posts
    125
    To attach yor db, first zip it. Then, instead of using the quick reply at the bottom of the post, click 'go advanced'.

    Beneath the advanced reply box is a button called manage attachments. Click this to upload the zipped file from your computer to the site. Then type in anything you need to say as usual, then post your message and the attachment should be present at the bottom of your new post.

    Incidentally, I only have access 2000 so you will need to save your Access file in Acess 2000 format before zipping it if you want me to be able to view it.

    EDIT: Erk...I see you figured it out while I was posting. However, the access 2000 issue likely remains

  12. #12
    maxx3 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    May 2009
    Location
    Mosta Malta
    Posts
    32
    Do you have any idea of how I can save it to be viewed on access 2000

  13. #13
    maxx3 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    May 2009
    Location
    Mosta Malta
    Posts
    32
    I think I have managed to do it Ihope you can view it now this database as I said there is only a few data on the fist three names because I'm only trying for now thanks

  14. #14
    maxx3 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    May 2009
    Location
    Mosta Malta
    Posts
    32

    Question

    Hi did you manage to see it if not try this

  15. #15
    CraigDolphin is offline Competent Performer
    Windows XP Access 2000
    Join Date
    Apr 2009
    Location
    Custer, WA, USA
    Posts
    125
    Hi Max,

    no...I think you still have it in AC2003 format.
    You can convert it using Tools>Database Utilities>ConvertDatabase>To Prior Access Version

Page 1 of 3 123 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Top 25 query problem
    By tmcrouse in forum Queries
    Replies: 3
    Last Post: 05-07-2009, 09:02 AM
  2. problem with query
    By kiethb in forum Queries
    Replies: 3
    Last Post: 04-24-2009, 11:42 AM
  3. Problem in Query
    By Bruno Trindade in forum Queries
    Replies: 4
    Last Post: 03-28-2009, 04:10 PM
  4. problem with query size
    By acheo in forum Queries
    Replies: 0
    Last Post: 04-11-2007, 10:46 AM
  5. Is this a Query or Sorting problem?
    By bwrobel in forum Queries
    Replies: 2
    Last Post: 07-14-2006, 08:15 AM

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