Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2009
    Posts
    93

    Unanswered: Finding records from control

    I have a basic login system working where usernames and passwords are checked against the Employee table in SQL. This happend on Form1 and if username/password accepted, the user progresses to Form2

    On Form2, i have a grid which i am trying to find all records in Tables Details where the username was passed in txtusername.text textbox in Form1. I am trying to input

    Select * from Details Inner Join Employee On Employee.Employeeid = Details.Employeeid where employee.uname = 'txtusername.text'

    but having no luck. How can i find records that links to the txtusername control. Any help is much appreciated.


    Employee
    Employeeid
    Uname
    Password

    Details
    Employeeid
    Course_Name
    Completed_Date

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Stuff between single quotes is treated as literal text.

    I doubt you have a username of "txtusername.text"!

    Create a sproc and pass txtusername.text as a parameter
    George
    Home | Blog

  3. #3
    Join Date
    Oct 2009
    Posts
    93
    When i create txtusername as a sproc, i cannot save the paramater then in a view i am trying to create. I'm not getting anywhere

Posting Permissions

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