Results 1 to 8 of 8
  1. #1
    Join Date
    Oct 2009
    Posts
    4

    Unanswered: I can't make a querie based on user input!

    Hi everyone, here is the problem: I have a table(Access 2003) with the fields:
    surname, licenceNum(primary key), and i want to make form (textbox) as an user input.
    When i give a surname in the textbox for example "Someone" the query must return only the row "Someone","4456/95", not all the rows of the table. I think it's simple but i am very troubled making it, for one week. Please give me a hand... Thanks

  2. #2
    Join Date
    Sep 2002
    Location
    South Wales
    Posts
    580
    SELECT * FROM yourtablename WHERE yoursurnamefield = Forms!YourFormName.YourTextBoxName
    Windows Server 2003-8 / Terminal Services / SQL 2000 / Access 2003 / Office 2003-7 / Exchange 2003-7 / Blackberry Enterprise Server / AutoCAD / Lambert And Butler / Red Bull

  3. #3
    Join Date
    Oct 2009
    Posts
    4
    Thank you. Finaly worked!

  4. #4
    Join Date
    Oct 2009
    Posts
    4

    Can i create a view of the table?

    By the way,
    When i run the query the returned rows can be modified.
    How is it possible the rows to be read only?

  5. #5
    Join Date
    Sep 2002
    Location
    South Wales
    Posts
    580
    I would maybe use this query as the recordsource of a form or report rather than giving the user access to the data - this will allow you to present the information in a nice format too.
    Windows Server 2003-8 / Terminal Services / SQL 2000 / Access 2003 / Office 2003-7 / Exchange 2003-7 / Blackberry Enterprise Server / AutoCAD / Lambert And Butler / Red Bull

  6. #6
    Join Date
    Oct 2009
    Posts
    4
    I am trying to extract to Desktop, to run independently, any idea?

  7. #7
    Join Date
    Sep 2002
    Location
    South Wales
    Posts
    580
    No, Im afraid I don't understand what you are trying to acheive by this.

    Please explain in more detail.
    Windows Server 2003-8 / Terminal Services / SQL 2000 / Access 2003 / Office 2003-7 / Exchange 2003-7 / Blackberry Enterprise Server / AutoCAD / Lambert And Butler / Red Bull

  8. #8
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Just make a report from the data, don't provide direct access to the query to users via your interface. The interface should only give the report, which is connected to your query.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

Posting Permissions

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