Page 1 of 5 123 ... LastLast
Results 1 to 15 of 65

Thread: I have a Query!

  1. #1
    Join Date
    Jul 2004
    Location
    Cumbria
    Posts
    35

    Talking Unanswered: I have a Query!



    i have a database which is running fine. i have decided i want to make a query, but am unsure how. i want to "search" for specific records, but want a simpler search than the"find" button provides (other people use this database who are less computer literate)

    can i actually do this and if so how? any help is appreciated, but tey not to use really big words, as i only have a little brain!!!!



  2. #2
    Join Date
    Jun 2004
    Location
    Seattle, WA
    Posts
    601
    Do you want to make a query, when you open it it shows the names only of employees for example.

  3. #3
    Join Date
    Jul 2004
    Location
    Cumbria
    Posts
    35
    in a way - yes.
    i want to be able to search for an address, and then maybe have a seperate search for the identifying number also.
    eg address is 73 pica cottages and the identifying number is 64346.
    we mainly do address searches but sometimes we also have a need for the "number" search too.

  4. #4
    Join Date
    Jun 2004
    Location
    Seattle, WA
    Posts
    601
    is that 64346 the key?

  5. #5
    Join Date
    Jul 2004
    Location
    Cumbria
    Posts
    35
    i dont have a key, i didnt really see the point, but it could be if it needed to be

  6. #6
    Join Date
    Jun 2004
    Location
    Seattle, WA
    Posts
    601
    If so you can open the query editor in design view drag that or type that field the 64364 number is in. Then in the criteria box put [something] ex, [ID number]. Then drag the adress field in the next column. and like the name of what the address belongs to (if needed). Save and Close the query. When you reopen it ( not in design view ) a dialog box will come up asking ID Number. If you enter 64346, that addy will pop up

  7. #7
    Join Date
    Jun 2004
    Location
    Seattle, WA
    Posts
    601
    Quote Originally Posted by Selphie_1234
    i dont have a key, i didnt really see the point, but it could be if it needed to be
    All table have to have some kind of key...Access will not save a table unless theres a primary key

  8. #8
    Join Date
    Jul 2004
    Location
    Cumbria
    Posts
    35
    ta! would it work the other way round if i set the address field as my primary key?

  9. #9
    Join Date
    Jun 2004
    Location
    Seattle, WA
    Posts
    601
    no, I'd set that 643.. number as my key if every addy has one and EVERY one is different

  10. #10
    Join Date
    Jul 2004
    Location
    Cumbria
    Posts
    35
    but mostly we do address searches, and they are also all different.

  11. #11
    Join Date
    Jun 2004
    Location
    Seattle, WA
    Posts
    601
    No see a Primary Key is something that uniquely identify every record (ROW). List akk the fields (columns ) in your table.

  12. #12
    Join Date
    Jul 2004
    Location
    Cumbria
    Posts
    35
    but if i set my primary key t obe the address row (which is also a unique identifier) would that not work?

  13. #13
    Join Date
    Jun 2004
    Location
    Seattle, WA
    Posts
    601
    I am confused about your table layout...Please list it

  14. #14
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    Access will not save a table unless theres a primary key
    well... actually it will. just say NO to the big-brother msgbox that asks if you want A to add a primary key (but why you would want a table without PK is another story).

    meanwhile, don't worry that you search by address and rguy wants you to use something else as PK.

    PKs are not (not-often for most people, not-ever for me) there for searching: they are there to allow relationships between your tables. there are some philosophers who insist that PKs have ZERO meaning (e.g. the good old autonumber) ...that way there will never be any temptation to edit the PK). think carefully and worry about using 64346 as PK if you may one day need to edit this number to 64345... it complicates your life.

    and last of all, you can search for anything anywhere in your database. key, not key, indexed, not indexed, whatever. even memo-fields in A95 if you work at it.

    it would be nice to see the table that has 64346 and the address in it. with that, someone will probably run you up a little search form that will do the job nicely. you will need to say which field is what data-type.

    izy
    currently using SS 2008R2

  15. #15
    Join Date
    Jun 2004
    Location
    Seattle, WA
    Posts
    601
    I assumed she didn't just make an excel file basically...hence why i was confused about the layout, that 643 number, and no PK.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •