Results 1 to 2 of 2

Thread: Sql query in vb

  1. #1
    Join Date
    May 2011

    Unanswered: Sql query in vb

    i have a query like

    qu1 = "Select Deptname from Depart where Deptno= "

    where i want to display the depart name in a text box while entering deptno in other text box

    so with above query i want to concatenate the text box value after =

    where the entering string is of data type text

    can anyone help???????????????????


    thnx in advance

  2. #2
    Join Date
    Jan 2009
    Kerala, India

    Sql query in vb

    You may write a Dlookup() Function (not an sql statement) in the Text Box's Control Source property to display the Department Name in the Textbox.

    =Dlookup("DeptName","Depart","DeptNo = " & me![DeptNo]) (Learn MS-Access Tips & Tricks)
    Learn Advanced MS-Access Programming with sample VBA Code.

    All responses are based on Access 2003/2007

Posting Permissions

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